Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to store the greatest number value? Pin
toxcct10-Oct-04 21:21
toxcct10-Oct-04 21:21 
Questionwhy did it thow CFileException::diskFull? Pin
twing9-Oct-04 22:30
twing9-Oct-04 22:30 
Questionbeginner: initializing objects in constructor? Pin
7stud9-Oct-04 17:29
7stud9-Oct-04 17:29 
AnswerRe: beginner: initializing objects in constructor? Pin
Antony M Kancidrowski10-Oct-04 2:57
Antony M Kancidrowski10-Oct-04 2:57 
GeneralRe: beginner: initializing objects in constructor? Pin
7stud10-Oct-04 17:49
7stud10-Oct-04 17:49 
GeneralRe: beginner: initializing objects in constructor? Pin
Antony M Kancidrowski11-Oct-04 5:09
Antony M Kancidrowski11-Oct-04 5:09 
GeneralRe: beginner: initializing objects in constructor? Pin
7stud11-Oct-04 8:58
7stud11-Oct-04 8:58 
GeneralRe: beginner: initializing objects in constructor? Pin
Antony M Kancidrowski11-Oct-04 11:05
Antony M Kancidrowski11-Oct-04 11:05 
7stud wrote:
My test code shows that your statement is incorrect

You are not going to get code to execute if you are not using it! In the context of your original question I thought I had explained that you do not need to initialize the composite class objects. You do need to instantiate the class that holds these composites however. Sorry if you did not understand this.

When a class is instantiated then all other composite classes within that class are instantiated, if they are defined in the manner discussed earlier.

With regards to the Dialog class constructor.

CCodeProject_Dialog2Dlg dlg;
Does calls the constructor

CCodeProject_Dialog2Dlg::CCodeProject_Dialog2Dlg(CWnd* pParent /*=NULL*/)<br />
: CDialog(CCodeProject_Dialog2Dlg::IDD, pParent)


NOTE: When the header has 1 parameter that is defaulted (in this case to NULL) you do not need to pass that parameter as long as you want the default behaviour.


Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Williams (Little Britain)

GeneralRe: beginner: initializing objects in constructor? Pin
7stud12-Oct-04 0:40
7stud12-Oct-04 0:40 
GeneralRe: beginner: initializing objects in constructor? Pin
Antony M Kancidrowski12-Oct-04 2:54
Antony M Kancidrowski12-Oct-04 2:54 
GeneralEmbarsssing Menu Question Pin
...---...9-Oct-04 16:52
...---...9-Oct-04 16:52 
GeneralRe: Embarsssing Menu Question Pin
X204010-Oct-04 0:00
X204010-Oct-04 0:00 
GeneralComboBox Dumb Question Pin
otrcomm9-Oct-04 16:01
otrcomm9-Oct-04 16:01 
GeneralRe: ComboBox Dumb Question Pin
Michael Dunn9-Oct-04 16:48
sitebuilderMichael Dunn9-Oct-04 16:48 
GeneralRe: ComboBox Dumb Question Pin
otrcomm9-Oct-04 17:17
otrcomm9-Oct-04 17:17 
Generaldoing evil to Critical Section Pin
peterchen9-Oct-04 14:31
peterchen9-Oct-04 14:31 
GeneralRe: doing evil to Critical Section Pin
geo_m9-Oct-04 20:28
geo_m9-Oct-04 20:28 
GeneralHelp needed on file handling... Pin
Kiran Satish9-Oct-04 14:26
Kiran Satish9-Oct-04 14:26 
QuestionHow to bind data from database to a combobox in Dialog? Pin
tip23109-Oct-04 13:00
tip23109-Oct-04 13:00 
General3D-rotaion in VC++ Pin
huffmancoding9-Oct-04 12:21
huffmancoding9-Oct-04 12:21 
GeneralRe: 3D-rotaion in VC++ Pin
alex.barylski9-Oct-04 13:25
alex.barylski9-Oct-04 13:25 
GeneralRe: 3D-rotaion in VC++ Pin
Anonymous9-Oct-04 15:55
Anonymous9-Oct-04 15:55 
GeneralGetting text from combo box control Pin
7stud9-Oct-04 10:55
7stud9-Oct-04 10:55 
GeneralRe: Getting text from combo box control Pin
Wes Aday9-Oct-04 11:08
professionalWes Aday9-Oct-04 11:08 
GeneralRe: Getting text from combo box control Pin
7stud9-Oct-04 11:19
7stud9-Oct-04 11:19 

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.