![]() |
How to destroy CXTPPopupControl |
Post Reply
|
| Author | |
eksubbot
Newbie
Joined: 23 April 2009 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: How to destroy CXTPPopupControlPosted: 23 April 2009 at 8:28am |
|
Hello all,
I have a question related to CXTPPopupControl. I create popup control as CXTPPopupControl* pPopupControl = new CXTPPopupControl(). Should I release this memory manually if user presses close button or it will be deleted automatically? Should I release this memory manually if we call pPopupControl ->Close()? In help I see that CXTPPopupControl::Close method destroys a popup window but there is no information if CXTPPopupControl's destructor is called. Thanks in advance. |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 April 2009 at 3:04am |
|
I believe this is correctly implemented in Samples\Controls\PopupControl.
|
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
terrym
Senior Member
Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 April 2009 at 3:24am |
We have OnPopUpControlNotifyt as below which is called and closes the popup control:
LRESULT CMainFrame::OnPopUpControlNotify( WPARAM wParam, LPARAM lParam ){ if ( wParam == XTP_PCN_ITEMCLICK ){ CXTPPopupItem *pItem = (CXTPPopupItem *)lParam; ASSERT( pItem ); // get click id int nID = pItem->GetID(); // close popup pItem->GetPopupControl()->Close(); // was this a click ? if ( nID == POPUP_CONTROL_HYPERLINK_BUY_NOW ){ // yes, so open buy now page OnActivateBuyNow();} } m_PopupControl.OnNotify( wParam, lParam ); return TRUE;} |
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |