|
-
May 19th, 1999, 09:51 AM
#1
Cant Describe It?
I am calling multiple dialog's from my SDI view Class , the problem is that i get an assertion failure when i call my dialog for the second time. I traced the problem to the following code, written on InitDialog.
m_tip.Create(this)
This is a MFC tooltip class taken from code guru! I have tried to destroy the object m_tip , i have tried to destroy the window but nothing seems to work ... Could somebody help me !!
-
May 20th, 1999, 05:13 AM
#2
Re: Cant Describe It?
I presume m_tip is a CWnd derived class....
You could check to see if it has already been createdif ( !::IsWindow(m_tip.m_hWnd) )
m_tip.Create(this);
Or if you need to force the window to destory you could try something like this:if ( ::IsWindow(m_tip.m_hWnd) )
{
HWND hWnd = m_tip.Detach();
if ( hWnd )
: estroyWindow(hWnd);
}
m_tip.Create(this)
You might beed to play around with it a bit, but this should be the general idea.
-
May 20th, 1999, 10:02 AM
#3
Re: Cant Describe It?
Thanx for your advice , i will try it out...
But i have another problem too! I have succesfully displayed a toolbar in a dialog box but the second time i call the dialog box the LoadToolbar functions returns an error. Although the program functions normally but the toolbar images are not loaded!
Can you help me ????
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
|