Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What is the use of ".rc2" file in MFC. Pin
Nelek23-Feb-10 21:42
protectorNelek23-Feb-10 21:42 
AnswerRe: What is the use of ".rc2" file in MFC. Pin
KarstenK23-Feb-10 21:37
mveKarstenK23-Feb-10 21:37 
QuestionHow to Create user defined constructor for dialog class. Pin
Abhijit D. Babar23-Feb-10 21:01
Abhijit D. Babar23-Feb-10 21:01 
AnswerRe: How to Create user defined constructor for dialog class. Pin
Rajesh R Subramanian23-Feb-10 21:06
professionalRajesh R Subramanian23-Feb-10 21:06 
GeneralRe: How to Create user defined constructor for dialog class. Pin
Abhijit D. Babar23-Feb-10 21:14
Abhijit D. Babar23-Feb-10 21:14 
GeneralRe: How to Create user defined constructor for dialog class. Pin
Rajesh R Subramanian23-Feb-10 21:18
professionalRajesh R Subramanian23-Feb-10 21:18 
AnswerRe: How to Create user defined constructor for dialog class. Pin
CPallini23-Feb-10 21:12
mveCPallini23-Feb-10 21:12 
AnswerRe: How to Create user defined constructor for dialog class. Pin
Nelek23-Feb-10 21:19
protectorNelek23-Feb-10 21:19 
Yes, you can create user defined constructor, and yes, you can pass parameters through the constructor to the dialog, but as the CDialog already gets a CWnd* as constructor parameter, NULL if nothing else is said.

CSample (CWnd* pParent = NULL);


I would use Set/Get methodes to pass parameters, because if you overload the constructor parameters, it may be that the MFC (if you use it) gives you problems if you have an error overloading the constructor. After just use the contructor to initialize the member variables/pointers

I mean:

CSample obj; // equivalent to-> CSample obj (NULL);
obj.SetParam1(value1);
obj.SetParam2(value2);
...
obj.DoModal ();


So you are passing the parameters before it gets invoked as you said in an answer to Rajesh
Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.

GeneralRe: How to Create user defined constructor for dialog class. Pin
CPallini23-Feb-10 21:25
mveCPallini23-Feb-10 21:25 
GeneralRe: How to Create user defined constructor for dialog class. Pin
Nelek23-Feb-10 21:35
protectorNelek23-Feb-10 21:35 
QuestionWhat is the datatype for "this" pointer in C++ Pin
Abhijit D. Babar23-Feb-10 20:34
Abhijit D. Babar23-Feb-10 20:34 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
Saurabh.Garg23-Feb-10 20:48
Saurabh.Garg23-Feb-10 20:48 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Avi Berger23-Feb-10 21:52
Avi Berger23-Feb-10 21:52 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Saurabh.Garg23-Feb-10 22:32
Saurabh.Garg23-Feb-10 22:32 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Richard MacCutchan24-Feb-10 1:12
mveRichard MacCutchan24-Feb-10 1:12 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Avi Berger24-Feb-10 4:57
Avi Berger24-Feb-10 4:57 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Richard MacCutchan24-Feb-10 7:34
mveRichard MacCutchan24-Feb-10 7:34 
GeneralRe: What is the datatype for "this" pointer in C++ Pin
Avi Berger25-Feb-10 5:58
Avi Berger25-Feb-10 5:58 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
Cedric Moonen23-Feb-10 20:50
Cedric Moonen23-Feb-10 20:50 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
CPallini23-Feb-10 21:05
mveCPallini23-Feb-10 21:05 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
Emilio Garavaglia23-Feb-10 21:14
Emilio Garavaglia23-Feb-10 21:14 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
Avi Berger23-Feb-10 21:31
Avi Berger23-Feb-10 21:31 
QuestionRe: What is the datatype for "this" pointer in C++ Pin
Avi Berger24-Feb-10 5:03
Avi Berger24-Feb-10 5:03 
AnswerRe: What is the datatype for "this" pointer in C++ Pin
KingsGambit23-Feb-10 22:43
KingsGambit23-Feb-10 22:43 
Questionasynchronouse thread function Pin
hrishi32123-Feb-10 18:14
hrishi32123-Feb-10 18:14 

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.