Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Clash Rocker   Members   -  Reputation: 130

Like
Likes
Like

Posted 07 August 2001 - 07:19 AM

I have some edit controls on my dialog box. When the controls
EN_KILLFOCUS 
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

Sponsor:

#2 Mike   Members   -  Reputation: 140

Like
Likes
Like

Posted 07 August 2001 - 07:45 AM

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.

#3 Clash Rocker   Members   -  Reputation: 130

Like
Likes
Like

Posted 08 August 2001 - 05:41 AM

OK here''s my menu:
File ()
->Open.. (ID_FILE_OPEN)
->Close (ID_FILE_CLOSE)
->Save (ID_FILE_SAVE)
->Exit (ID_FILE_EXIT)

Help
->About (ID_HELP_ABOUT)
->Readme (ID_HELP_README)

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].




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS