Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
howard liu
|
Apr 5, 2008 - 4:38 AM
|
Hi support, This is the screen shot of my application; You can see a combobox on the top of the window ; the application has a a splitter window where the first pane has a tree view and the second is a listview , the tree view contents gets modified based on the selected item in the Combobox . Now that I am trying to change that Combobox to a outlook kind of view , previously the combobox related event was handled in the mainframe, but now how do I handle the page expanding event in the mainframe ? Can u suggest me which message map macro should I use for achieving it? and would be great if u post a small code snippet for a sample application. Thanks & regards, Raghavendra H V
|
|
Technical Support
|
Apr 7, 2008 - 9:50 AM
|
All the common controls send notification messages to their parent windows only. But there are two ways to handle combo box events:
1) Message handling. You can add message handler methods for the combo box control in the C++ class which implements the parent window of the combo box control.
2) Message reflection. You can create your own combo box class and add message reflection methods for handling combo box messages which it really sends to its parent window.
We think you need the second way. class CYourComboBox : public CExtComboBox
{
public:
. . .
public:
afx_msg void OnSelEndOK();
. . .
}
BEGIN_MESSAGE_MAP( CYourComboBox, CExtComboBox )
//{{AFX_MSG_MAP(CYourComboBox)
//}}AFX_MSG_MAP
ON_CONTROL_REFLECT( CBN_SELENDOK, OnSelEndOK )
END_MESSAGE_MAP()
void CYourComboBox::OnSelEndOK()
{
ASSERT_VALID( this );
Default();
. . .
}
|
|