![]() |
Get the pointer to ComboBox from cmd Bar? |
Post Reply
|
| Author | |
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: Get the pointer to ComboBox from cmd Bar?Posted: 18 May 2005 at 2:17pm |
|
Hello:
I create command bar that have combo box control. The combo box automatically update the selection when user select a particular drawing shape. How do write a simple codes to access to CommandBar--> Combox Box control pointer? In the bottom example, I would like to access to the pointer of pComboFontName from other class. ---------------- SAMPLE CREATE COMBO BOX CONTROL FOR COMMANDBARS ---------- int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) { if (lpCreateControl->bToolBar == FALSE) { } else { CXTPToolBar* pToolBar = DYNAMIC_DOWNCAST(CXTPToolBar, lpCreateControl->pCommandBar); if (!pToolBar) { return FALSE; } //--------------------- Create Font Face Name ------------------------- if (lpCreateControl->nID == ID_FONT_FACENAME && pToolBar->GetBarID() == IDR_EASY_FONT_BAR) { CXTPControlFontComboBox *pComboFontName = new CXTPControlFontComboBox(); pComboFontName->SetDropDownListStyle(); lpCreateControl->pControl = pComboFontName; return TRUE; } //---------------------------------------------------------- ------------ return FALSE; } |
|
![]() |
|
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 May 2005 at 2:22pm |
|
In this case, I would like to access from the CView class, where void CEasyFlowChartView::UpdateCells() function is called.
Mike |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 5:35am |
|
I recommend you update it in UpdateHandler, use: CXTPControl::FromUI(pCmdUI)
see void CWordPadView::OnUpdateComboFont(CCmdUI* pCmd)
in GUI_Office11 sample. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 10:11am |
|
Oleg,
Thank you. I am looking into GUI_Office11 sample. Mike |
|
![]() |
|
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 |