Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: load dll on remote PC Pin
CPallini21-Mar-12 3:00
mveCPallini21-Mar-12 3:00 
AnswerRe: load dll on remote PC Pin
Malli_S21-Mar-12 3:09
Malli_S21-Mar-12 3:09 
GeneralRe: load dll on remote PC Pin
Malli_S21-Mar-12 3:11
Malli_S21-Mar-12 3:11 
AnswerRe: load dll on remote PC Pin
jschell21-Mar-12 9:00
jschell21-Mar-12 9:00 
QuestionError in add event handler ? Pin
doanhanam20-Mar-12 14:31
doanhanam20-Mar-12 14:31 
AnswerRe: Error in add event handler ? Pin
enhzflep20-Mar-12 15:02
enhzflep20-Mar-12 15:02 
GeneralRe: Error in add event handler ? Pin
doanhanam20-Mar-12 18:58
doanhanam20-Mar-12 18:58 
GeneralRe: Error in add event handler ? Pin
enhzflep20-Mar-12 19:19
enhzflep20-Mar-12 19:19 
Okay sure, you added the code by hand.

What makes you think that it is correct?

You don't want an object of type CDialog that has the appearance of your IDD_ABOUTBOX - You want an object of type CAboutDlg.

Just because the dialog looks like your about box, doesn't mean that it has the message_map connected to it or any other event handlers for that matter.

In fact, the only reason that the OK button works is because it already has the ID of IDOK - an ID that is handled by windows and causes the dialog to be closed.


I'll repeat again - your code IS incorrect!
You need to create an object of type CAboutDlg, then call DoModal on it. simple!


Consider the following:

Your dialog is of class CAboutDlg. This inherits from CDialog.
You can't expect to create a CDialog and have it behave like a CAboutDlg, since CDialog knows nothing of the internals of CAboutDlg.
GeneralRe: Error in add event handler ? Pin
doanhanam20-Mar-12 19:21
doanhanam20-Mar-12 19:21 
GeneralRe: Error in add event handler ? Pin
doanhanam20-Mar-12 19:20
doanhanam20-Mar-12 19:20 
AnswerRe: Error in add event handler ? Pin
enhzflep20-Mar-12 16:54
enhzflep20-Mar-12 16:54 
GeneralRe: Error in add event handler ? Pin
doanhanam20-Mar-12 19:16
doanhanam20-Mar-12 19:16 
GeneralRe: Error in add event handler ? Pin
enhzflep20-Mar-12 19:20
enhzflep20-Mar-12 19:20 
Questionmsdn 2010 professional - read double format Pin
mrby12320-Mar-12 10:59
mrby12320-Mar-12 10:59 
AnswerRe: msdn 2010 professional - read double format Pin
Peter_in_278020-Mar-12 11:10
professionalPeter_in_278020-Mar-12 11:10 
SuggestionRe: msdn 2010 professional - read double format Pin
Albert Holguin20-Mar-12 12:53
professionalAlbert Holguin20-Mar-12 12:53 
AnswerRe: msdn 2010 professional - read double format Pin
Luc Pattyn20-Mar-12 13:04
sitebuilderLuc Pattyn20-Mar-12 13:04 
GeneralRe: msdn 2010 professional - read double format Pin
Peter_in_278020-Mar-12 13:28
professionalPeter_in_278020-Mar-12 13:28 
GeneralRe: msdn 2010 professional - read double format Pin
Albert Holguin20-Mar-12 13:36
professionalAlbert Holguin20-Mar-12 13:36 
QuestionLooking for idea(s) Pin
David Crow20-Mar-12 4:09
David Crow20-Mar-12 4:09 
AnswerRe: Looking for idea(s) Pin
Albert Holguin20-Mar-12 5:17
professionalAlbert Holguin20-Mar-12 5:17 
QuestionRe: Looking for idea(s) Pin
David Crow20-Mar-12 7:50
David Crow20-Mar-12 7:50 
AnswerRe: Looking for idea(s) Pin
Albert Holguin20-Mar-12 8:31
professionalAlbert Holguin20-Mar-12 8:31 
AnswerRe: Looking for idea(s) Pin
enhzflep20-Mar-12 8:42
enhzflep20-Mar-12 8:42 
GeneralRe: Looking for idea(s) Pin
David Crow20-Mar-12 10:09
David Crow20-Mar-12 10:09 

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.