i have this opengl game i'm working on, and when i click the menu bar
at the top of the window, the game pauses. anyone know why this is?
does the peekmessage function get blocked when you click the menu bar?

i'm using a standard loop like this:

if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
else dosomeopengldrawing();

Re: menu bar by Igor

Igor
Mon Feb 06 22:12:04 CST 2006

<bob@coolgroups.com> wrote in message
news:1139280834.178828.103870@g43g2000cwa.googlegroups.com
> i have this opengl game i'm working on, and when i click the menu bar
> at the top of the window, the game pauses. anyone know why this is?
> does the peekmessage function get blocked when you click the menu bar?

Menu bar runs its own modal loop. The control does not return to your
message pump until the menu is dismissed. See WM_ENTERMENULOOP,
WM_ENTERIDLE
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925