Print Page | Close Window

CXTPControlCustom in a TearOff-able popup

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=3729
Printed Date: 10 November 2025 at 1:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlCustom in a TearOff-able popup
Posted By: kanitamildasan
Subject: CXTPControlCustom in a TearOff-able popup
Date Posted: 03 March 2006 at 11:09pm

Hi,

Adding CXTPControlCustom to a TearOff-able CXTPPopupBar makes problems.


Try to Tear-off the popup and hold the left mouse button, move the popup down until its turn into the
popuptoolbar and move the popuptoolbar window to near the toolbar button the window attach itself
to the toolbar button as popup but the custom control hides

Here is a sample code that tries to add CXTDateTimeCtrl
in the ColorPopup(ID_BUTTON_TEXT) of the TearOffPopups Sample

  if (lpCreateControl->nID == ID_BUTTON_TEXT && pToolBar->GetBarID() == IDR_MAINFRAME)
  {

   CXTPControlPopup* pPopup = CXTPControlPopup::CreateControlPopup(xtpControlSplitButtonPo pup);

   CXTPPopupBar* pColorBar = CXTPPopupToolBar::CreatePopupToolBar(GetCommandBars());
   pPopup->SetCommandBar(pColorBar);

   if (!m_date.Create(DTS_UPDOWN, CRect(0, 0, 100, 22), this, 12345))
   {
    return FALSE;
   }

   CXTPControlCustom* pControlDate = CXTPControlCustom::CreateControlCustom(&m_date);

   pControlDate->SetFlags(xtpFlagManualUpd ate);

   pColorBar->GetControls()->Add(pContr olDate, 12345);
   pColorBar->GetControls()->Add(new CXTPControlColorSelector(), ID_SELECTOR_TEXT);

   pColorBar->SetTearOffPopup(_T("Text Color"), 1005, 0);
   pColorBar->EnableCustomization(FALSE);

   pColorBar->InternalRelease();

   lpCreateControl->pControl = pPopup;

   return TRUE;
  }

thanks in advance



-------------
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2
Visual C++ 6.0 SP 6



Replies:
Posted By: Oleg
Date Posted: 06 March 2006 at 10:47am

Yes, it's true. CXTPControlCustom  can't work with Tear Off popups.

 



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


Posted By: kanitamildasan
Date Posted: 07 March 2006 at 12:44am
 thanks for the reply

-------------
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2
Visual C++ 6.0 SP 6


Posted By: Ark42
Date Posted: 07 March 2006 at 11:20am
I use a custom control derived class to put a slider bar on a toolbar which can be torn-off, customized, duplicated, etc with no problems.
https://forum.codejock.com/forum_posts.asp?TID=1763 -
https://forum.codejock.com/forum_posts.asp?TID=1763


Posted By: kanitamildasan
Date Posted: 07 March 2006 at 10:18pm

Hi,

Ark42 , Thanks for the reply

Did you tried my above code ?

Adding CXTDateTimeCtrl to popup is just for sample i'm looking for to add CXTColorSelector to popup with tear-off so i can get user color feature easily along with the flexibility of adding/removiong buttons of popuptoolbars to get popups like in powerpoint (fill color,line color in drawing toolbar)



-------------
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2
Visual C++ 6.0 SP 6



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