Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC and OpenGL Pin
29-Oct-01 2:19
suss29-Oct-01 2:19 
GeneralMenu message handler wont work! Pin
25-Oct-01 8:39
suss25-Oct-01 8:39 
GeneralRe: Menu message handler wont work! Pin
Tomasz Sowinski25-Oct-01 8:45
Tomasz Sowinski25-Oct-01 8:45 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 9:10
suss25-Oct-01 9:10 
GeneralRe: Menu message handler wont work! Pin
Tomasz Sowinski25-Oct-01 9:13
Tomasz Sowinski25-Oct-01 9:13 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 9:46
suss25-Oct-01 9:46 
GeneralRe: Menu message handler wont work! Pin
Tomasz Sowinski25-Oct-01 9:57
Tomasz Sowinski25-Oct-01 9:57 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 10:11
suss25-Oct-01 10:11 
Well I know, it is all my fault. I haven't really understood how to add a message handler for a menu bar item. I just created an empty MFC project and then added a new menu item (ID_FILE_SOMEITEM).

Then through the Class Wizard on Mesage Maps tab I chose the view class CMyAppView and chose ID_FILE_SOMEITEM in ObjectIDs and then clicked on Command in Messages and clicked the Add Function button.

The class wizard created the function OnFileListen.
I added the same AfxMessageBox("Code Reachable"); line inside the function and when I built the project.....I was expecting it to give me a message box alert on clicking File>SomeItem

But Nothing Happens. Evidently I am making a pretty basic mistake in creation of message handlers.
Tell me what to correct.
GeneralRe: Menu message handler wont work! Pin
Tomasz Sowinski25-Oct-01 10:16
Tomasz Sowinski25-Oct-01 10:16 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 10:22
suss25-Oct-01 10:22 
GeneralRe: Menu message handler wont work! Pin
Christian Graus25-Oct-01 10:05
protectorChristian Graus25-Oct-01 10:05 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 10:17
suss25-Oct-01 10:17 
GeneralRe: Menu message handler wont work! Pin
Christian Graus25-Oct-01 10:30
protectorChristian Graus25-Oct-01 10:30 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 10:38
suss25-Oct-01 10:38 
GeneralRe: Menu message handler wont work! Pin
Christian Graus25-Oct-01 10:46
protectorChristian Graus25-Oct-01 10:46 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 10:51
suss25-Oct-01 10:51 
GeneralRe: Menu message handler wont work! Pin
Christian Graus25-Oct-01 11:51
protectorChristian Graus25-Oct-01 11:51 
GeneralRe: Menu message handler wont work! Pin
Fazlul Kabir25-Oct-01 12:02
Fazlul Kabir25-Oct-01 12:02 
GeneralRe: Menu message handler wont work! Pin
25-Oct-01 15:23
suss25-Oct-01 15:23 
GeneralRe: Menu message handler wont work! Pin
Christian Graus25-Oct-01 15:32
protectorChristian Graus25-Oct-01 15:32 
GeneralVC++ Pin
25-Oct-01 8:34
suss25-Oct-01 8:34 
GeneralRe: VC++ Pin
Christian Graus25-Oct-01 10:00
protectorChristian Graus25-Oct-01 10:00 
GeneralRe: VC++ Pin
25-Oct-01 10:18
suss25-Oct-01 10:18 
Generaldialog app update windows Pin
25-Oct-01 7:27
suss25-Oct-01 7:27 
GeneralRe: dialog app update windows Pin
Chris Losinger25-Oct-01 7:29
professionalChris Losinger25-Oct-01 7:29 

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.