Click here to Skip to main content
15,914,307 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Wait cursor remain waiting after the even finished Pin
Iain Clarke, Warrior Programmer29-Sep-09 0:26
Iain Clarke, Warrior Programmer29-Sep-09 0:26 
QuestionProblem in Image save Pin
Game-point28-Sep-09 21:37
Game-point28-Sep-09 21:37 
AnswerRe: Problem in Image save [modified] Pin
CPallini28-Sep-09 22:35
mveCPallini28-Sep-09 22:35 
GeneralRe: Problem in Image save Pin
Game-point28-Sep-09 22:47
Game-point28-Sep-09 22:47 
GeneralRe: Problem in Image save Pin
CPallini28-Sep-09 23:08
mveCPallini28-Sep-09 23:08 
GeneralRe: Problem in Image save Pin
Game-point28-Sep-09 23:13
Game-point28-Sep-09 23:13 
Questionrun one system exe on the Another system Pin
trioum28-Sep-09 21:31
trioum28-Sep-09 21:31 
AnswerRe: run one system exe on the Another system Pin
Rajesh R Subramanian29-Sep-09 1:54
professionalRajesh R Subramanian29-Sep-09 1:54 
GeneralRe: run one system exe on the Another system Pin
trioum29-Sep-09 2:44
trioum29-Sep-09 2:44 
QuestionPointer to CWnd* - why does not this work? [modified] Pin
Makakuin28-Sep-09 21:23
Makakuin28-Sep-09 21:23 
AnswerRe: Pointer to CWnd* - why does not this work? Pin
Cedric Moonen28-Sep-09 21:50
Cedric Moonen28-Sep-09 21:50 
QuestionRe: Pointer to CWnd* - why does not this work? Pin
CPallini28-Sep-09 22:08
mveCPallini28-Sep-09 22:08 
AnswerRe: Pointer to CWnd* - why does not this work? Pin
Makakuin28-Sep-09 22:09
Makakuin28-Sep-09 22:09 
QuestionHow can i read environment variable from c program [modified] Pin
mohant$.net28-Sep-09 20:08
mohant$.net28-Sep-09 20:08 
AnswerRe: How can i read environment variable from c program Pin
Code-o-mat28-Sep-09 20:25
Code-o-mat28-Sep-09 20:25 
AnswerRe: How can i read environment variable from c program Pin
«_Superman_»28-Sep-09 20:47
professional«_Superman_»28-Sep-09 20:47 
QuestionCListCtrl Pin
john563228-Sep-09 20:01
john563228-Sep-09 20:01 
AnswerRe: CListCtrl Pin
Code-o-mat28-Sep-09 20:22
Code-o-mat28-Sep-09 20:22 
GeneralRe: CListCtrl Pin
john563228-Sep-09 20:25
john563228-Sep-09 20:25 
GeneralRe: CListCtrl Pin
Code-o-mat28-Sep-09 20:37
Code-o-mat28-Sep-09 20:37 
QuestionConstrucor getting called twice........ Pin
hrishiS28-Sep-09 19:31
hrishiS28-Sep-09 19:31 
AnswerRe: Construcor getting called twice........ Pin
Iain Clarke, Warrior Programmer28-Sep-09 19:40
Iain Clarke, Warrior Programmer28-Sep-09 19:40 
You have classA, and classB inheriting from that.
You make a new classB, and both classB::classB() and classA::classA() are getting called?

This is not a bad thing. This is a GOOD thing.

Imagine if this was not the case. CDialog is a slightly complex class. You make a new dialog. Your constructor would have to do all the special work of your new class. AND ann the special work of a CDialog. AND all the special work of a CWnd. AND all the special work of a CObject.

(It's turtles all the way down).

If you want to control which CDialog constructor gets called, you need to do the following:

CMyDlg::CMyDlg (CWnd *pParent)
: CDialog (IDD_MYDLG, pParent)   // take this line out, and CDialog::CDialog () will get called.
{


In addition - the base class constructor gets called first. Again, imagine if it was the other way around. All the stuff not included in the inheriting class would be uninitialised.

I hope that helps,

Iain.

I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

AnswerRe: Construcor getting called twice........ Pin
Alan Balkany5-Oct-09 4:40
Alan Balkany5-Oct-09 4:40 
QuestionPassing data in dialog based application (model dialog) Pin
hrishiS28-Sep-09 18:54
hrishiS28-Sep-09 18:54 
AnswerRe: Passing data in dialog based application (model dialog) Pin
Solon_lee28-Sep-09 19:30
Solon_lee28-Sep-09 19:30 

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.