UI dies during data processing
I have a small Windows app that accepts a data file from a user, then processes the data. During the processing of the data (about 15-20 seconds) the user interface completely quits responding. Not just the buttons, but the window itself stop working. I can't close, move, minimize, or even activate. If the windows gets covered by another window, the whole thing turns white until the processing is done. Just wondering what the best way to fix this is.
This is my first Windows program, by the way.
Basically we have this:
Code:
// basic stuff
switch(msg)
{
// ... other stuff
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case GO_BUTTON:
{
// variables
while(fgets(line, 1024, file)){
// stuff
/**********
UI is completely dead here
*************/
}
}
}
}
}