Returning focus to window
-
I'm using dialog window for data display. The data displayed on Gauge control with colored background, using StaticText control. At the first appearance of the dialog the data is displayed. After moving focus to another window and returning to my dialog the data in StaticText control is not displayed, only the colored Gauge appears. But after few minutes the data becomes visible. How can I cause controls to be refreshed in the correct way?
-
I'm using dialog window for data display. The data displayed on Gauge control with colored background, using StaticText control. At the first appearance of the dialog the data is displayed. After moving focus to another window and returning to my dialog the data in StaticText control is not displayed, only the colored Gauge appears. But after few minutes the data becomes visible. How can I cause controls to be refreshed in the correct way?
am not sure that i understood your problem correctly but i want you to try this solution put the line of code that draw on the dialog or insert data in the Controls inside the function called "OnPaint" --> "WM_PAINT" you will find this function and if not found bring it from the Class wizard of the Dialog. the OnPaint is called every time an Update Occured in your window. so when you will set the focus to your dialog again the OnPaint will be called which will draw and set inputs again.