yes, if you just expanded the while block to include the graphics code then at least something would happen. However I would also suggest a study of windows main loops. The structure you have will not be set up for a nicely timed drawing scheme since it will be strictly controlled by the message pump there. You could dig into the ON_PAINT message perhaps...
here's a few out of context mainloops though:
Code:
//do this for a while
while(GetMessage(&msg, NULL, 0, 0))
{
if(!TranslateAccelerator(hwndApp, hacc, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
PlaySound(snd, hinst, SND_ASYNC | SND_NODEFAULT | SND_RESOURCE);
}
or...
Code:
while(1)
{
startime = GetTickCount();
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
// do something here
anothertime = GetTickCount();
}
}
and..
Code:
while(1)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
{
if (!GetMessage(&msg, NULL, 0, 0))
return msg.wParam;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else if(!paused)
{
//go to town
}
else WaitMessage();
}
So if you did an index search in the MS SDK for 'WaitMessage', for example, then you would be all around that mainloop functionality. Also, if I'm not mistaken there is some good example code for some GDI bouncing ball thing as well.
keep me posted on your progress I'd be interested to see this.