Click here to Skip to main content
15,918,003 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Property Pages question Pin
Bill Wilson16-Nov-01 7:15
Bill Wilson16-Nov-01 7:15 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 11:12
RobJones16-Nov-01 11:12 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 11:52
RobJones16-Nov-01 11:52 
GeneralRe: Property Pages question Pin
Bill Wilson16-Nov-01 13:12
Bill Wilson16-Nov-01 13:12 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 13:15
RobJones16-Nov-01 13:15 
GeneralRAS events Pin
15-Nov-01 4:24
suss15-Nov-01 4:24 
GeneralRe: RAS events Pin
Masaaki Onishi15-Nov-01 17:07
Masaaki Onishi15-Nov-01 17:07 
GeneralOwner drawn button with drop-down menu Pin
Derek Lakin15-Nov-01 3:35
Derek Lakin15-Nov-01 3:35 
As some of you may be aware I have an owner drawn button class (CButtonSSL), which is capable of displaying a drop-down arrow and a menu.

I have recently discovered that if the parent window of the button loses focus then when focus is regained the check state of the menu items is lost, i.e. none of the menu items are checked any more Frown | :(

For those of you without the source code the class stores a CMenu member variable, m_menu. In the call to SetSSLButtonMenu the menu is initialised with a call to m_menu.LoadMenu passing in the resource ID of the menu. The menu item check states are altered in the call to CheckSSLMenuItem which calls m_menu.CheckMenuItem () passing in the menu ID and the check state.

In the OnLButtonDown event handler the popup menu is shown as follows:
CMenu* pMenu = m_menu.GetSubMenu (0);
pMenu->TrackPopupMenu (TPM_RIGHTALIGN | TPM_LEFTBUTTON, x, y, GetParent ());


I have scoured the MSDN and other such resources and get work out why the menu would be losing it's check states. Any suggestions?



Derek Lakin.
Salamander Software Ltd.
QuestionWhen to delete, and when to NULL? Pin
Chambers15-Nov-01 3:33
Chambers15-Nov-01 3:33 
AnswerRe: When to delete, and when to NULL? Pin
Nish Nishant15-Nov-01 3:50
sitebuilderNish Nishant15-Nov-01 3:50 
AnswerRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 4:53
Jon Sagara15-Nov-01 4:53 
GeneralRe: When to delete, and when to NULL? Pin
Ray Kinsella15-Nov-01 6:02
Ray Kinsella15-Nov-01 6:02 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 6:46
Jon Sagara15-Nov-01 6:46 
GeneralRe: When to delete, and when to NULL? Pin
Jim A. Johnson15-Nov-01 6:08
Jim A. Johnson15-Nov-01 6:08 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 6:50
Jon Sagara15-Nov-01 6:50 
GeneralRe: When to delete, and when to NULL? Pin
Michael Dunn15-Nov-01 9:11
sitebuilderMichael Dunn15-Nov-01 9:11 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 10:58
Jon Sagara15-Nov-01 10:58 
GeneralRe: When to delete, and when to NULL? Pin
Jim A. Johnson15-Nov-01 12:15
Jim A. Johnson15-Nov-01 12:15 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 12:36
Jon Sagara15-Nov-01 12:36 
GeneralRe: When to delete, and when to NULL? Pin
Tim Smith15-Nov-01 12:54
Tim Smith15-Nov-01 12:54 
GeneralRe: When to delete, and when to NULL? Pin
Colin Urquhart15-Nov-01 15:47
Colin Urquhart15-Nov-01 15:47 
GeneralRe: When to delete, and when to NULL? Pin
Michael Dunn15-Nov-01 19:07
sitebuilderMichael Dunn15-Nov-01 19:07 
GeneralRe: When to delete, and when to NULL? Pin
#realJSOP16-Nov-01 0:50
professional#realJSOP16-Nov-01 0:50 
AnswerRe: When to delete, and when to NULL? Pin
Gert Boddaert15-Nov-01 5:06
Gert Boddaert15-Nov-01 5:06 
AnswerRe: Thankyou All. Pin
Chambers15-Nov-01 9:32
Chambers15-Nov-01 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.