Print Page | Close Window

WM_COMMAND for custom CXTButton...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5625
Printed Date: 04 March 2025 at 5:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WM_COMMAND for custom CXTButton...
Posted By: bschaer
Subject: WM_COMMAND for custom CXTButton...
Date 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;

}

}



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net