Click here to Skip to main content
15,891,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what is the meaning of this expression int *(*table())[30]; Pin
werpa5-Jan-07 8:46
werpa5-Jan-07 8:46 
Questionchar and int mixed array repeat output ! Pin
davvid2-Jan-07 4:10
davvid2-Jan-07 4:10 
AnswerRe: char and int mixed array repeat output ! Pin
CPallini2-Jan-07 4:28
mveCPallini2-Jan-07 4:28 
AnswerRe: char and int mixed array repeat output ! Pin
John R. Shaw2-Jan-07 11:14
John R. Shaw2-Jan-07 11:14 
QuestionDetecting GUI events Pin
narada1502-Jan-07 3:08
narada1502-Jan-07 3:08 
AnswerRe: Detecting GUI events Pin
CPallini2-Jan-07 3:24
mveCPallini2-Jan-07 3:24 
GeneralRe: Detecting GUI events Pin
narada1503-Jan-07 8:48
narada1503-Jan-07 8:48 
QuestionMFC Message map routing question Pin
Arris742-Jan-07 2:42
Arris742-Jan-07 2:42 
Hello,

I use a context menu with 2 sub menus as follow:

My Contex Menu>
TheMenu1
TheMenu2

If I click on TheMenu1 I would like the COMMAND message routed to a message handler function within
the class MyTreeCtrl derived from CTreeCtrl

and if I click on TheMenu2 I would like the COMMAND message routed to a message handler function within the class MyDialog class derived from CFileDialog

TheMenu1 works well but TheMenu2 does not.

I use VS 2003 and when I Created the context menu I used the event handler wizard to map Themenu1 and Themenu2 to their respective function and I selected the right class that receives the function. I created the event handler for MyTreeCtrl first.

Message map code is also correct here is the sample

//Class MyTreeCtrl
BEGIN_MESSAGE_MAP(MyTreeCtrl, CTreeCtrl)

ON_COMMAND(ID__NEW_INDICATOR, OnIndicatorIsNew)

END_MESSAGE_MAP()

// Fuctions are below
Bla Bla...

************************************
//Class MyDialog

BEGIN_MESSAGE_MAP(MyDialog ,CFileDialog)


ON_COMMAND(ID__NEW_SYMBOL, OnSymbolIsNew)

END_MESSAGE_MAP()


// Fuctions are below
Bla Bla...


My question is why class MyDialog does not intercept the message?

Also I have noticed that if I delete

ON_COMMAND(ID__NEW_INDICATOR, OnIndicatorIsNew)

and I leave
BEGIN_MESSAGE_MAP(MyTreeCtrl, CTreeCtrl)

//blank
END_MESSAGE_MAP()

everything continues to work wellConfused | :confused:
any idea??

Thnks for your help


AnswerRe: MFC Message map routing question Pin
S Douglas2-Jan-07 23:24
professionalS Douglas2-Jan-07 23:24 
GeneralRe: MFC Message map routing question Pin
Arris743-Jan-07 7:32
Arris743-Jan-07 7:32 
QuestionConvert project VC++6.0 to VC++.Net Pin
Atul232-Jan-07 2:20
Atul232-Jan-07 2:20 
AnswerRe: Convert project VC++6.0 to VC++.Net Pin
Cristian Amarie2-Jan-07 6:41
Cristian Amarie2-Jan-07 6:41 
AnswerRe: Convert project VC++6.0 to VC++.Net [modified] Pin
S Douglas2-Jan-07 23:32
professionalS Douglas2-Jan-07 23:32 
QuestionHow to Invoke Resource-Only DLL Dialogs Pin
Pradeep.Reddy2-Jan-07 1:29
Pradeep.Reddy2-Jan-07 1:29 
QuestionRe: How to Invoke Resource-Only DLL Dialogs Pin
prasad_som2-Jan-07 1:35
prasad_som2-Jan-07 1:35 
AnswerRe: How to Invoke Resource-Only DLL Dialogs Pin
Pradeep.Reddy3-Jan-07 7:17
Pradeep.Reddy3-Jan-07 7:17 
AnswerRe: How to Invoke Resource-Only DLL Dialogs Pin
prasad_som3-Jan-07 19:03
prasad_som3-Jan-07 19:03 
AnswerRe: How to Invoke Resource-Only DLL Dialogs Pin
Johan Pretorius2-Jan-07 2:42
Johan Pretorius2-Jan-07 2:42 
GeneralRe: How to Invoke Resource-Only DLL Dialogs Pin
Pradeep.Reddy3-Jan-07 7:13
Pradeep.Reddy3-Jan-07 7:13 
AnswerRe: How to Invoke Resource-Only DLL Dialogs Pin
Cristian Amarie2-Jan-07 6:50
Cristian Amarie2-Jan-07 6:50 
GeneralRe: How to Invoke Resource-Only DLL Dialogs Pin
Pradeep.Reddy3-Jan-07 7:11
Pradeep.Reddy3-Jan-07 7:11 
GeneralRe: How to Invoke Resource-Only DLL Dialogs Pin
Cristian Amarie3-Jan-07 8:00
Cristian Amarie3-Jan-07 8:00 
QuestionThe Active X control cannot be instantiated Pin
nripun2-Jan-07 1:20
nripun2-Jan-07 1:20 
GeneralRe: The Active X control cannot be instantiated Pin
prasad_som2-Jan-07 1:32
prasad_som2-Jan-07 1:32 
GeneralRe: The Active X control cannot be instantiated Pin
nripun2-Jan-07 1:45
nripun2-Jan-07 1:45 

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.