Re: [WTL] CSpinListBox( CSpinButtonCtrl) messages
Vincent RICHOMME a ?crit :
Hi,
does someone know how to catch a selection change in a CSpinListBox.
It should be similar to MFC CSpinButtonCtrl...
I am trying to catch UDN_EXPANDING but no success
class CMainDlg : public CStdSimpleDialog<IDD_MAINDLG, WTL_STD_SHIDIF>
{
protected:
// Typedefs
typedef CMainDlg thisClass; // Classe courante
typedef CStdSimpleDialog<IDD_MAINDLG, WTL_STD_SHIDIF> baseClass;
//class mere
// Data members
CButton m_btn0;
//CBitmapButton m_bTest;
public:
// Constructor
CMainDlg() : baseClass()
{
}
enum { IDD = IDD_MAINDLG, IDD_LANDSCAPE = IDD_MAINDLG };
BEGIN_MSG_MAP(CMainDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
//COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout)
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
COMMAND_HANDLER(IDC_BTN_0, BN_CLICKED, OnClickBtnTest)
#ifdef WIN32_PLATFORM_PSPC
COMMAND_HANDLER(IDC_STATUS_LIST, CBN_SELCHANGE, OnStatusSelchange)
#else
COMMAND_HANDLER(IDC_STATUS_LIST, UDN_EXPANDING, OnStatusSelchange)
#endif
CHAIN_MSG_MAP(CStdSimpleDialog<IDD>)
END_MSG_MAP()
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
/*lParam*/, BOOL& bHandled);
LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL&
/*bHandled*/);
LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/,
BOOL& /*bHandled*/);
LRESULT OnClickBtnTest(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
LRESULT OnStatusSelchange(WORD /*wNotifyCode*/, WORD wID, HWND hWndCtl,
BOOL& /*bHandled*/);
//LRESULT OnAppAbout(WORD /*wNotifyCode*/, WORD /*wID*/, HWND
/*hWndCtl*/, BOOL& /*bHandled*/)
protected:
#ifdef WIN32_PLATFORM_PSPC
//Pocket pc
CComboBox m_slbStatus;
#else
//Smartphone
CSpinListBox m_slbStatus;
#endif
// Helpers
void InitializeControls(void);
void UninitializeControls(void);
};