![]() |
CXTPCustomControl with radio buttons |
Post Reply
|
| Author | |
RayJ
Newbie
Joined: 22 November 2004 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPCustomControl with radio buttonsPosted: 22 November 2004 at 3:21pm |
|
I'm placing radio buttons in a custom conrol in the OnCreateControl method as follows: if ((lpCreateControl->nID == IDC_RADIO_COORD_TRACK || lpCreateControl->nID == IDC_RADIO_COORD_LOCATE) && pToolBar->GetBarID() == IDR_TOOLBAR_COORDS){UINT nID = lpCreateControl->nID; CXTPControlCustom* pControlOption = (CXTPControlCustom*)CXTPControlCustom::CreateObject(); pControlOption->SetID(nID); CButton& wndOption = m_wndCoordinateBarRadioOptions[nID-IDC_RADIO_COORD_TRACK]; if (!wndOption.Create(pControlOption->GetCaption(), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,CRect(0, 0, 75, 20), this, nID)) {return FALSE; } wndOption.SetFont(CXTPPaintManager::GetRegularFont()); lpCreateControl->pControl = pControlOption; My problem is that after I exist the program and restart it and undock the toolbar I get both the buttons and the radio items showing up on the toolbar like this:
What am I doing wrong. Thanks Ray |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 November 2004 at 12:42am |
|
from 9.10 you must use CXTPControlCustom::CreateControlCustom: CButton& wndOption = m_wndCoordinateBarRadioOptions[nID-IDC_RADIO_COORD_TRACK]; if (!wndOption.Create(pControlOption->GetCaption(), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, CXTPControlCustom* pControlOption = CXTPControlCustom::CreateControlCustom(&m_wndOption);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
RayJ
Newbie
Joined: 22 November 2004 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 November 2004 at 9:20am |
|
So I must have the latest version for this to work? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 November 2004 at 11:39pm |
|
if you haven't CreateControlCustom method then "yes".
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |