Print Page | Close Window

ASSERT Failure on CWnd:DestroyWindow()

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=581
Printed Date: 17 June 2024 at 1:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ASSERT Failure on CWnd:DestroyWindow()
Posted By: GWinkler
Subject: ASSERT Failure on CWnd:DestroyWindow()
Date Posted: 29 March 2004 at 12:33pm

Hi, I'm having some problems creating a pop-able command bar. The popup is correctly shown and commands execute fine. But when the window is about to be destroyed an assertion failure raises.

Function CWnd:DestroyWindow()

ASSERT(m_hWnd == hWndOrig);   wincore.cpp line 986

this is the snapshot of the code I'm using to create it

//CXTPPopupBar* m_PPBar
m_PPBar = CXTPPopupBar::CreatePopupBar(GetCommandBars());

//popup creation
CXTPControlPopup * newPopup = CXTPControlPopup::CreateControlPopup(xtpControlPopup);

   
newPopup->SetCommandBar(ptrPopup->m_PPBar);
   
newPopup->SetCaption(ptrPopup->m_Name);
newPopup->SetStyle(xtpButtonIconAndCaption);
newPopup->SetEnabled(TRUE);
newPopup->SetFlags(xtpFlagManualUpdate);
   
tempCtrls->Add(newPopup,ptrPopup->m_Id,"",index);

 




Replies:
Posted By: Oleg
Date Posted: 29 March 2004 at 10:54pm
so you use m_PPBar some times?  try to create it each time need to show popup.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net