LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

My text messsage is not visible during my program works

Solved!
Go to solution

I have write a programm, to write a file format in an other.

The files are so big that the programm work very long. So I made a text message  that show the program is still working.

 

In the beginning was working well. But now the text messages is no longer displayed.
I have no idea what the problem is.

 

some code:

int CVICALLBACK ReadCallback (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	int iConfiguration;
	switch (event)
	{
		case EVENT_COMMIT:
			
			SetCtrlAttribute (panelHandle, PANEL_TXTMSG_Load, ATTR_VISIBLE, 1);

			GetCtrlVal (panelHandle, PANEL_Dataset_Conf, &iConfiguration);	
Function_Worker(iConfiguration); SetCtrlAttribute (panelHandle, PANEL_TXTMSG_Load, ATTR_VISIBLE, 0); break; case EVENT_LEFT_CLICK: break; } return 0; }

 

The function_worker does made nothing with the GUI but it works with a DLL. Is this a problem?

 

Do you have any ideas?

 

 


0 Kudos
Message 1 of 4
(3,292 Views)
Solution
Accepted by topic author susay

Hi,

 

When your program executes in a callback function or in code that does not call RunUserInterface or GetUserEvent, LabWindows/CVI does not process user interface events. Functions that are overly time-consuming can "lock out" user interface events. To allow LabWindows/CVI to process events, call ProcessDrawEvents.

 

Message 2 of 4
(3,290 Views)

Somewhat more elaborate I'd suggest to modify your code as follows:

 

case EVENT_COMMIT:
    SetCtrlAttribute (panelHandle, PANEL_TXTMSG_Load, ATTR_VISIBLE, 1);

    ProcessDrawEvents ();
    GetCtrlVal (panelHandle, PANEL_Dataset_Conf, &iConfiguration);
    Function_Worker(iConfiguration);
    SetCtrlAttribute (panelHandle, PANEL_TXTMSG_Load, ATTR_VISIBLE, 0);
    break;

0 Kudos
Message 3 of 4
(3,285 Views)

Thank you very much. With "ProcessDrawEvents ();" it works perfectly.

0 Kudos
Message 4 of 4
(3,279 Views)