Archived

This topic is now archived and is closed to further replies.

edit box troubles.. growl!

This topic is 5153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im writing a chat program in win32/c++ for my main loop if i use " while (GetMessage(&msg, hwnd, 0, 0) > 0) " all of my dialog items work fine and dandy, but my program will only update only when theres action occuring in the window. if i put " PeekMessage(&msg, hwnd, NULL, NULL, PM_REMOVE); " inside a while loop, my window will update if its not in focus but my edit boxes will update at insane speeds making it impossible to use.... how would i get the program to update when its not in focus but also have my dialog items update like they should...

Share this post


Link to post
Share on other sites

while(!done)
{
if (PeekMessage(&msg, NULL, 0,0, PM_NOREMOVE))
{
if (!GetMessage(&msg, NULL, 0, 0))
{
return (int)msg.wParam;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
//do whatever here...

}


hmmm i got it all sorted out... this seems to work perfectly :]

Share this post


Link to post
Share on other sites