Jump to content
  • Advertisement
Sign in to follow this  
Trillian

[Win32] Handeling WM_ACTIVATE correctly

This topic is 4656 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

Hello! I've noticed that pressing ALT while my windowed D3D app is running pauses it. I must press ALT again to unpause it. The application is deactivated because my app acts as if it was being minimized.
[source lang=cpp]
case WM_ACTIVATE: // Watch For Window Activate Message
{
	if(!HIWORD(wParam)) // ifnot minimized
		m_bActive=true;
	else
		m_bActive=false;

	return 0; // Return To The Message Loop
}


But it pauses not only when minimized, but also when I press that ALT key. How can I make it pause only if it's getting minimized? Is there a LOWORD param for this? thanks!

Share this post


Link to post
Share on other sites
Advertisement

I don't know the answer directly, but maybe you can put a breakpoint
in the WM_ACTIVATE and see what values are passed to it in various
situations (like pressing alt).
Or alternatively use OutputDebugString to write these messages containing
the wparam and lparam for this event to the debug-logwindow (visual studio
specific)

I figured out the codes passed to wm_notify for some controls that
way (sometimes the msdn is a pain to find anything in) :)

Regards

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!