The base class call to OnInitDialog *is* called first, and was also asserting, 
this one on ::IsWindow(m_hWnd) in the UpdateData() call..  So I added a boolean 
to the class and at the end of OnInitDialog I set it to true, and UpdateData 
gets skipped until the boolean is set to true.  Once I did that, the IsWindow 
assertion failure moved from UpdateData() to AddString().
This whole thing doesn't make any sense because 1) this dialog has been working 
fine for a long time, and I haven't made any changes to that class, and 2) I 
found another dialog where the same thing is done, and that one is working 
fine.  I did a complete rebuild and it didn't help. I think that I need to step 
through the two instances and see why the code is taking a different path in 
one than in the other.  Thanks for the help.

-Jean Palmer

>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Jason Teagle
>Sent: Thursday, February 10, 2005 10:35 AM
>To: [email protected]
>Subject: RE: [msvc] CComboBox AddString
>
>
>> (Note: I'm assuming MFC here)
>
>(Correct)
>
>>
>> Maybe I'm getting you wrong here, but isn't it enough to call
>> UpdateData() somewhere at in the beginning of OnInitDialog()?
>
>I'm afraid not. That only transfers the values from control to 
>variables (or
>vice versa) - it does not make the necessary initial 
>connection between the
>two. If you try and call this before the base class call to 
>OnInitDialog(),
>it will also assert for the same reason.
>
>--
>Jason Teagle
>[EMAIL PROTECTED]
>
>
>
>_______________________________________________
>msvc mailing list
>[email protected]
>See 
http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to