![]() |
WM_COMMAND for custom CXTButton... |
Post Reply ![]() |
Author | |
bschaer ![]() Groupie ![]() Joined: 27 June 2006 Location: United States Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() Posted: 28 November 2006 at 3:42am |
I have a CXTButton object in a toolbar along with other objects all connected via CreateControlCustom. All of the windows controls (CComboBox, CEdit, etc) that I have placed in the toolbar send their notifications properly to the dialog with the exception of CXTButton (WM_COMMAND or BN_CLICKED). The ON_UPDATE_COMMAND_UI processing DOES work properly for all controls including the CXTButton. Can you shed any light on this? I used CXTButton instead of CXTPButtonControl so that I could apply a specific theme to the button and do things like: m_btnBuy.GetTheme()->SetAlternateColors(RGB(50,50,255), RGB(160,160,255), RGB(0,0,180), RGB(255,255,255)); . int CTabPageMontage::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl){ if (lpCreateControl->nID == IDC_BUTTON_MONTAGE_BUY)
{ if (!m_btnBuy.Create("Buy", BS_PUSHBUTTON | BS_NOTIFY | WS_TABSTOP | WS_CHILD | WS_VISIBLE, CRect(0, 0, 80, 24), this, IDC_BUTTON_MONTAGE_BUY)) return FALSE;m_btnBuy.SetFont(GetFont()); m_btnBuy.SetXButtonStyle(BS_XT_SEMIFLAT); m_btnBuy.SetTheme( new CXTButtonTheme);(lpCreateControl->pControl = CXTPControlCustom::CreateControlCustom(&m_btnBuy))->SetFlags(xtpFlagManualUpdate); return TRUE;} } |
|
![]() |
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 |