Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPControlCustom in a TearOff-able popup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlCustom in a TearOff-able popup

 Post Reply Post Reply
Author
Message
kanitamildasan View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlCustom in a TearOff-able popup
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
kanitamildasan View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
kanitamildasan View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.