Thanks in advance,
Daniel Chambers
--
1. Derive a class from CButton, override the WM_KEYUP message in your
derived class.
or
2. Trap the WM_KEYUP Message in your dialog's PreTranslateMessage (which
would probable be easier if all you are enabling or disabling things).
M
"Daniel Chambers" <kyle...@hotmail.com> wrote in message
news:opsftbqx...@phoenix-ii.vic.optushome.com.au...
Try ON_COMMAND. Implement it in a dialog class that contains the button:
in h:
class MyDialog
{
....
// Generated message map functions
//{{AFX_MSG(SelectAddressDialog)
//}}AFX_MSG
afx_msg void OhMyButtonPressedOrClicked();
DECLARE_MESSAGE_MAP()
};
in cpp:
BEGIN_MESSAGE_MAP( MyDialog, CDialog )
//}}AFX_MSG_MAP
ON_COMMAND( ID_MYBUTTON, OhMyButtonPressedOrClicked )
END_MESSAGE_MAP( )
void MyDialog::OhMyButtonPressedOrClicked()
{
::MessageBox("Well, this guy from the internet is right");
}
Greetings!
eg. (For people who read this)
CButton m_CtrlCheck;
if (m_CtrlCheck.GetState() == 521) {} //WRONG!!
if (m_CtrlCheck.GetState() & 0x0001) {} //Right!! Use a mask!
Thanks again!
koch...@pisem.net (Sergey Kochkarev) wrote in message news:<c882495.04101...@posting.google.com>...