Jump to content
  • Advertisement

Archived

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

kajjait

edit box troubles.. growl!

This topic is 5460 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
Advertisement

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!