Click here to Skip to main content
15,923,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: View Print Preview Pin
Roger Allen23-Oct-02 1:07
Roger Allen23-Oct-02 1:07 
QuestionHow to change menu's font ? Pin
Nguyen Huynh Hung22-Oct-02 17:52
Nguyen Huynh Hung22-Oct-02 17:52 
AnswerRe: How to change menu's font ? Pin
José Luis Sogorb23-Oct-02 7:11
José Luis Sogorb23-Oct-02 7:11 
GeneralHelp! ON_UPDATE_COMMAND_UI Not called prior to menu display Pin
work_to_live22-Oct-02 15:24
work_to_live22-Oct-02 15:24 
GeneralRe: ON_UPDATE_COMMAND_UI Not called prior to menu display Pin
Roger Allen23-Oct-02 1:10
Roger Allen23-Oct-02 1:10 
GeneralRe: Help! ON_UPDATE_COMMAND_UI Not called prior to menu display Pin
Jonathan Craig23-Oct-02 6:29
Jonathan Craig23-Oct-02 6:29 
GeneralRe: Help! ON_UPDATE_COMMAND_UI Not called prior to menu display Pin
work_to_live23-Oct-02 9:04
work_to_live23-Oct-02 9:04 
GeneralRe: Help! ON_UPDATE_COMMAND_UI Not called prior to menu display Pin
work_to_live23-Oct-02 12:00
work_to_live23-Oct-02 12:00 
Tried overriding OnCmdMsg in CChildFrame, and my splitter window. Still no luck. Then I thought I'd try placing the menu items on the main menu bar instead of in the popup menu I was using (an important piece of information I omitted from the original problem statement). The menu bar implementation worked perfectly.

It got me thinking it must have something to do with the way I implemented the popup menu. The only thing I saw was the use of the this pointer as the owner of the popup menu (my view). I changed the owner from this to GetParentFrame(), and everything started working! I suppose the mechanism that implements the ON_UPDATE_COMMAND_UI message is above the View class in this MDI multi splitter window application.
Oh well, live and learn.

Here's the simple change that solved the problem.
was...
subMenu->TrackPopupMenu(0, point.x, point.y,this, NULL);
is... (works)
subMenu->TrackPopupMenu(0, point.x, point.y,GetParentFrame(), NULL);

Thanks anyway for taking the time to respond. Maybe this will help someone else.
Questionintermediate project? Pin
Brian Olej22-Oct-02 14:52
Brian Olej22-Oct-02 14:52 
AnswerRe: intermediate project? Pin
Christian Graus22-Oct-02 15:32
protectorChristian Graus22-Oct-02 15:32 
GeneralRe: intermediate project? Pin
Brian Olej22-Oct-02 15:47
Brian Olej22-Oct-02 15:47 
GeneralNon MFC Async Socket Class Pin
Jared Allen22-Oct-02 14:47
Jared Allen22-Oct-02 14:47 
GeneralRe: Non MFC Async Socket Class Pin
Anonymous22-Oct-02 17:40
Anonymous22-Oct-02 17:40 
GeneralCRC32 without MFC Pin
int01h22-Oct-02 14:32
int01h22-Oct-02 14:32 
GeneralRe: CRC32 without MFC Pin
Chris Richardson22-Oct-02 15:19
Chris Richardson22-Oct-02 15:19 
GeneralRe: CRC32 without MFC Pin
Chris Losinger22-Oct-02 15:59
professionalChris Losinger22-Oct-02 15:59 
GeneralRe: CRC32 without MFC Pin
Daniel Turini22-Oct-02 22:21
Daniel Turini22-Oct-02 22:21 
GeneralStayOnTop for window. Pin
int01h22-Oct-02 13:33
int01h22-Oct-02 13:33 
GeneralRe: StayOnTop for window. Pin
Christian Graus22-Oct-02 13:36
protectorChristian Graus22-Oct-02 13:36 
GeneralRe: StayOnTop for window. Pin
int01h22-Oct-02 13:39
int01h22-Oct-02 13:39 
GeneralRe: StayOnTop for window. Pin
Christian Graus22-Oct-02 13:44
protectorChristian Graus22-Oct-02 13:44 
GeneralRe: StayOnTop for window. Pin
Anonymous23-Oct-02 4:31
Anonymous23-Oct-02 4:31 
GeneralRe: StayOnTop for window. Pin
Paul M Watt22-Oct-02 14:13
mentorPaul M Watt22-Oct-02 14:13 
GeneralRe: StayOnTop for window. Pin
Christian Graus22-Oct-02 15:34
protectorChristian Graus22-Oct-02 15:34 
GeneralC++ Memory Allocation and Memory Leakage Pin
Anonymous22-Oct-02 13:15
Anonymous22-Oct-02 13:15 

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.