![]() |
About sample "DynamicPopup" |
Post Reply
|
| Author | |
xxcln
Newbie
Joined: 05 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: About sample "DynamicPopup"Posted: 26 June 2007 at 8:47pm |
|
I simulate sample "DynamicPopup".but have problem in function OnCreateControl.
int CChildFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)
{ if (lpCreateControl->nID == ID_COUNTER_SEARCH) { lpCreateControl->controlType = xtpControlSplitButtonPopup; return TRUE; } if (lpCreateControl->nID == ID_ROOMS_TYPE) { lpCreateControl->pControl = new CControlFavorites("select DISTINCT type_name from r_room"); return TRUE; } return FALSE;
} I want to dynamic add subitem in menu,follow is detail about code:
"ID_COUNTER_SEARCH" is a button in toolbar also is a menu s' ID.
"ID_ROOMS_TYPE" is subitem of the menu ,the menu popup when "ID_COUNTER_SEARCH" is clicked.
But this code I don't why follow code not execute
if (lpCreateControl->nID == ID_ROOMS_TYPE)
{ lpCreateControl->pControl = new CControlFavorites("select DISTINCT type_name from r_room"); return TRUE; } |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 June 2007 at 12:43am |
|
Hi,
OnCreateControl is sent only to main site of CommandBars - CMainFrame.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
xxcln
Newbie
Joined: 05 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 June 2007 at 1:51am |
always trouble you,thanks
|
|
![]() |
|
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 |