Jump to content
  • Advertisement


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

Clash Rocker

[Win32 API]Not lossing window focus when user clicks on a menu.

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

I have some edit controls on my dialog box. When the controls
I up date the values in memory, so when user comes back to that dialog the values that were last inputed will there. My porblem is that when the user makes a change and then click on the menu "File" for example, the contorl doesn''t loss focus...unless "File" call a up a dialog or something...but it can''t, it''s the root of the menu resource. Anyways how can I solve this problem of not losing focus when the user clicks on the menu? TIA

Share this post

Link to post
Share on other sites
Here''s a guess. It seems to me that when you click on a menu, a WM_COMMAND message gets sent to the window. Just check to see if that message was generated by a menu. If so call SetFocus and set the focus to something else.

Share this post

Link to post
Share on other sites
OK here''s my menu:
File ()
->Open.. (ID_FILE_OPEN)


I can only trap the "submenus" Open and etc. I can''t trap "File" and "Help" because I can''t create a resource ID for them [File and Open].

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!