CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    28

    ComboBox within Toolbar Messages

    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
    [email protected]

  2. #2
    Join Date
    Apr 1999
    Location
    Metro-Atlanta, GA, USA
    Posts
    15

    Re: ComboBox within Toolbar Messages

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured