Link to home
Start Free TrialLog in
Avatar of sa9813

asked on


I have derived a class from CWnd, I have problem using the ON_UPDATE_COMMAND_UI. It workes fine as long as I derive from CFrameWnd, but my own class, nope! Am I missing something?
Avatar of Carel

Did you derive your own class from CFrameWnd?
I don't think u can handle ON_UPDATE_COMMAND_UI message in ur own derived class unless u provide the routing of the message to that class.

According to MFC architecture the message flows from CFrameWnd like this

This is the conent of MSDn CD..

When an object of this type receives a command . . . It gives itself and other command-target objects a chance to handle the command in this order:

I. MDI frame window

a.(CMDIFrameWnd) Active CMDIChildWnd

b.This frame window

c.Application (CWinApp object)  

II. Document frame window

a.(CFrameWnd, CMDIChildWnd) Active view

b.This frame window

c.Application (CWinApp object)  


a.This view

b.Document attached to the view  


a.This document

bDocument template attached to the document  

V.Dialog box

a.This dialog box

b.Window that owns the dialog box

c.Application (CWinApp object)  

Avatar of hsdhina

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sa9813


Give me some time to evaluate, I'm quite new to MFC ... I suppose this technical article is in msdn?
Avatar of sa9813


Answer accepted