I've been working on an application that ties together a couple of processing tasks into one graphical interface. I've got three main functions, each operating in their own thread, in parallel. One processes raw data obtained from sensors, the second is the main win32 application, used to display data, and the third communicates with a separate computer.
The problem I have is displaying the information that I've received from the sensors, which changes every 25 milliseconds, in my graphical interface.
I've established that the data is being passed from one thread to the other successfully (as an integer).
In my GUI I have dialog boxes dedicated to displaying this information, my current tactic is using the SetDlgItemInt() function in the main message loop. This is what the while loop looks like at the moment;
while (GetMessage(&msg, NULL, 0, 0))
{
SetDlgItemInt(hWnd, IDC_DISPBOX1, *Value, True);
if (!TranslateAccelerator(msg.hWnd, hAccelTable, &SMSFs))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
This displays the infomation, but it flashes constantly as it updates, and I was wondering if there is a better way to do this.
I'm new to win32 gui programming, and GUI programming in general, and I couldn't find an example of how to approach this way of displaying information, so this is what I've improvised using what I know of programming in this environment.