Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - WM_COMMAND for custom CXTButton...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WM_COMMAND for custom CXTButton...

 Post Reply Post Reply
Author
Message
bschaer View Drop Down
Groupie
Groupie


Joined: 27 June 2006
Location: United States
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote bschaer Quote  Post ReplyReply Direct Link To This Post Topic: WM_COMMAND for custom CXTButton...
    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;

}

}
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.