![]() |
CXTPControlButton /CXTPPopupBar display |
Post Reply
|
| Author | |
craig
Groupie
Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControlButton /CXTPPopupBar displayPosted: 15 December 2005 at 2:18pm |
|
I am displaying CXTPControlButton's on my CXTPPopupBar. I've done this numerous times with success, but for some reason this particular menu is getting buggy on me. The only difference with this popup is that it only has Popup buttons and no other controls. Here is my onCreateControl method and a snapshot of the problem:
![]() int CGeoDbWnd::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) { if (lpCreateControl->bToolBar) { // Maintenance popup if (lpCreateControl->nID == ID_GEODB_MAINTENANCE) { // Popup button to go on the menu CXTPControlPopup* pPopup = CXTPControlPopup::CreateControlPopup(xtpControlSplitButtonPo pup); // Bar to contain the controls CXTPPopupBar* pMaintenanceBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject(); // Vacuum Control CXTPControlButton* pVacuumBtn = new CXTPControlButton(); pMaintenanceBar->GetControls()->Add(pVacuumBtn, ID_GEODB_VACUUM); // Vacuum Analyze Control CXTPControlButton* pVacuumAnalyzeBtn = new CXTPControlButton(); pMaintenanceBar->GetControls()->Add(pVacuumAnalyzeBtn, ID_GEODB_VACUUM_ANALYZE); // Vacuum Full Control CXTPControlButton* pVacuumFullBtn = new CXTPControlButton(); pMaintenanceBar->GetControls()->Add(pVacuumFullBtn, ID_GEODB_VACUUM_FULL); // Spatial Index Control CXTPControlButton* pSpatialIndexBtn = new CXTPControlButton(); pMaintenanceBar->GetControls()->Add(pSpatialIndexBtn, ID_GEODB_SPATIAL_INDEX); // Hook the Maintenance Toolbar up to the Popup Button. pPopup->SetCommandBar(pMaintenanceBar); pMaintenanceBar->EnableCustomization(FALSE); // Don't allow this toolbar to be managed by the user. pMaintenanceBar->InternalRelease(); lpCreateControl->pControl = pPopup; //XTPImageManager()->SetIcon(ID_PT_FGCOLOR, ID_PT_FGCOLOR); return TRUE; } } return FALSE; } |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 December 2005 at 4:12am |
|
Hi, May be you need CXTPPopupBar::CreateObject(); instead CXTPPopupToolBar::CreateObject();
to make it looks like popup bar and not like popup toolbar? |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
craig
Groupie
Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2005 at 11:24am |
![]() Its always so obvious once I see the mistake I made. Copyitis rears its ugly head. Thanks Oleg. |
|
![]() |
|
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 |