Click here to Skip to main content
16,014,591 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPb with modeless Dialog in VS Add-in Pin
cnaudeau27-Nov-02 4:26
cnaudeau27-Nov-02 4:26 
GeneralEnable EditMenu for RichEdit Pin
Joerg Wiedenmann27-Nov-02 2:40
Joerg Wiedenmann27-Nov-02 2:40 
GeneralAbout Ole DB Pin
deffer27-Nov-02 1:50
deffer27-Nov-02 1:50 
QuestionHow can I do “text wrapping” for a text in a button control Pin
Hamzeh27-Nov-02 1:07
Hamzeh27-Nov-02 1:07 
AnswerRe: How can I do “text wrapping” for a text in a button control Pin
Jason Henderson27-Nov-02 3:11
Jason Henderson27-Nov-02 3:11 
AnswerRe: How can I do “text wrapping” for a text in a button control Pin
Roger Stewart27-Nov-02 3:24
professionalRoger Stewart27-Nov-02 3:24 
GeneralHelp on CryptoAPI under Windows 9x Pin
Anonymous27-Nov-02 0:58
Anonymous27-Nov-02 0:58 
GeneralCWnd::DestroyWindow assertion Pin
Brian van der Beek27-Nov-02 0:51
Brian van der Beek27-Nov-02 0:51 
I have an application that has a tab-page on which some controls can be placed. These controls are created in a DLL. When I try to delete these controls from within the DLL I get an assertion failure in the CWnd::DestroyWindow of the controls at ASSERT(m_hWnd == hWndOrig);.
Anyone know how to fix this? ...it is realy anoying me.

<br />
BOOL CWnd::DestroyWindow()<br />
{<br />
	if (m_hWnd == NULL)<br />
		return FALSE;<br />
<br />
	CHandleMap* pMap = afxMapHWND();<br />
	ASSERT(pMap != NULL);<br />
	CWnd* pWnd = (CWnd*)pMap->LookupPermanent(m_hWnd);<br />
#ifdef _DEBUG<br />
	HWND hWndOrig = m_hWnd;<br />
#endif<br />
<br />
#ifdef _AFX_NO_OCC_SUPPORT<br />
	BOOL bResult = ::DestroyWindow(m_hWnd);<br />
#else //_AFX_NO_OCC_SUPPORT<br />
	BOOL bResult;<br />
	if (m_pCtrlSite == NULL)<br />
		bResult = ::DestroyWindow(m_hWnd);<br />
	else<br />
		bResult = m_pCtrlSite->DestroyControl();<br />
#endif //_AFX_NO_OCC_SUPPORT<br />
<br />
	// Note that 'this' may have been deleted at this point,<br />
	//  (but only if pWnd != NULL)<br />
	if (pWnd != NULL)<br />
	{<br />
		// Should have been detached by OnNcDestroy<br />
#ifdef _DEBUG<br />
		ASSERT(pMap->LookupPermanent(hWndOrig) == NULL);<br />
#endif<br />
	}<br />
	else<br />
	{<br />
#ifdef _DEBUG<br />
		ASSERT(m_hWnd == hWndOrig);<br />
#endif<br />
		// Detach after DestroyWindow called just in case<br />
		Detach();<br />
	}<br />
	return bResult;<br />
}<br />

GeneralRe: CWnd::DestroyWindow assertion Pin
Rage27-Nov-02 1:37
professionalRage27-Nov-02 1:37 
GeneralRe: CWnd::DestroyWindow assertion Pin
Brian van der Beek27-Nov-02 1:43
Brian van der Beek27-Nov-02 1:43 
GeneralRe: CWnd::DestroyWindow assertion Pin
Rage27-Nov-02 1:57
professionalRage27-Nov-02 1:57 
GeneralRe: CWnd::DestroyWindow assertion Pin
Brian van der Beek27-Nov-02 2:04
Brian van der Beek27-Nov-02 2:04 
GeneralRe: CWnd::DestroyWindow assertion Pin
dabs27-Nov-02 2:44
dabs27-Nov-02 2:44 
GeneralRe: CWnd::DestroyWindow assertion Pin
Brian van der Beek27-Nov-02 2:58
Brian van der Beek27-Nov-02 2:58 
GeneralList Control in place editing Pin
devvvy27-Nov-02 0:36
devvvy27-Nov-02 0:36 
GeneralRe: List Control in place editing Pin
dabs27-Nov-02 3:04
dabs27-Nov-02 3:04 
Generallogonuser with CreateProcessAsUser Pin
r i s h a b h s26-Nov-02 23:55
r i s h a b h s26-Nov-02 23:55 
GeneralRe: logonuser with CreateProcessAsUser Pin
techno_guru27-Nov-02 5:41
techno_guru27-Nov-02 5:41 
GeneralEncryption Pin
AJ12326-Nov-02 23:44
AJ12326-Nov-02 23:44 
GeneralRe: Encryption Pin
Rage27-Nov-02 1:41
professionalRage27-Nov-02 1:41 
GeneralRe: Encryption Pin
Scott H. Settlemier27-Nov-02 3:46
Scott H. Settlemier27-Nov-02 3:46 
GeneralVoice over Internet - HOW Pin
Kunal Khairnar26-Nov-02 23:42
Kunal Khairnar26-Nov-02 23:42 
GeneralRe: Voice over Internet - HOW Pin
Scott H. Settlemier27-Nov-02 4:58
Scott H. Settlemier27-Nov-02 4:58 
GeneralDialog in CWinThread Pin
rrrado26-Nov-02 23:25
rrrado26-Nov-02 23:25 
GeneralRe: Dialog in CWinThread Pin
Rage27-Nov-02 1:32
professionalRage27-Nov-02 1:32 

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.