Hi All,
I'm looking to use ImageControl (ImageControl.fp) on another thread out main thread
In my second thread i try to update image but i have a error (This panel operation can be performed (if a top-level panel) only in the thread in which the panel was created, or (if a child panel) only in the thread in which the top-level parent panel was created.)
Here my code
Main thread :
ImageControl_ConvertFromDecoration (panelHandle, PANEL_IMAGECTRL, 0);
ImageControl_SetZoomToFit (panelHandle, PANEL_IMAGECTRL, 1);
ImageControl_SetAttribute (panelHandle, PANEL_IMAGECTRL, ATTR_IMAGECTRL_SHOW_SCROLLBARS, 0);
hdleThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) ThreadTest, NULL, 0, &idThread);
Secand thread :
int ThreadTest (void * data)
{
ImageControl_SetZoomToFit (panelHandle, PANEL_IMAGECTRL, 1);
iIdError = ImageControl_SetAttribute (panelHandle, PANEL_IMAGECTRL, ATTR_IMAGECTRL_IMAGE, imageToDisplay);
// iIdError = -129
}
Could you help me ?
Thankyou