|
-
May 2nd, 1999, 03:45 AM
#1
UpdateData() Error
hi,
i tried to call UpdateData function of Dialog box from its constructor and i got my favourite error "Assertion Failed". can't i call UpadateData function from the Constructor of the Dialog box. can any one explain this.
Thanks in Advance,
Kalyan
-
May 2nd, 1999, 04:27 AM
#2
Re: UpdateData() Error
Hello!
Calling member functions in a classes constructor usually causes an assertion failure, because i think the class has not yet been initialized completely. (Probably the constructors of the base-classes like CWnd etc. have to create the window first...)
What you should do is to put your initilization code in the OnInitDialog or OnInitialUpdate message handler.
Hope this helps.
Best regards.
Alan.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|