Chris Wheeler
April 21st, 1999, 10:09 AM
I'm having an infinite amount of trouble getting a windows event handler to attach to a combo box that I put in the toolbar per Randy More's article of 1999/03/23 on this site. Has anyone had experience with this or have a better way to include any control in the toolbar and process its messages??
Chris R. Wheeler, MCP
Pensacola Christian College
Desktop Programmer
cwheeler@pcci.edu
skenny
April 21st, 1999, 12:49 PM
The way we do it here is:
1) Create a class for the combobox derived from CComboBox. In here you will have your handlers for the combobox. In our class everything is taken care of in the OnCloseUp handler (Concerning knowing when the combobox is used).
2) Create a toolbar class for your app derived from CToolBar. In the OnCreate message handle create the Combobox and place it on the toolbar.
3) In your 'mainframe' class change the definition of the m_wndToolBar member variable to be defined as the toolbar class you just created.
Try this and let me know if it works. Don't you just love how twisted around you can get in this MFC and OOP stuff. It's great. Did you do the enhancement to the "tender check" dialog yet?
Shane Kenny
Software Engineer
Automated Logic Corporation