Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Message Handling in Controls instead of Dialog

Message Handling in Controls instead of Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    brigham_young
    wrote on last edited by
    #1

    I've added message handlers for a ComboBox control to that combobox's class (a subclass of CComboBoxEx which I have defined) to handle messages such as WM_CHAR, etc. However, when I use that combobox in a Dialog, my message handlers are not triggered by the user interactions which they are supposed to respond to. Any ideas on what is going on or how i can solve this problem would be much appreciated. Ben

    B A 2 Replies Last reply
    0
    • B brigham_young

      I've added message handlers for a ComboBox control to that combobox's class (a subclass of CComboBoxEx which I have defined) to handle messages such as WM_CHAR, etc. However, when I use that combobox in a Dialog, my message handlers are not triggered by the user interactions which they are supposed to respond to. Any ideas on what is going on or how i can solve this problem would be much appreciated. Ben

      B Offline
      B Offline
      bryce
      wrote on last edited by
      #2

      did you subclass it? in the oninitdialog... or somewhere useful m_myCombo.SubClassWindow(IDC_MYCOMBO, this); Bryce

      1 Reply Last reply
      0
      • B brigham_young

        I've added message handlers for a ComboBox control to that combobox's class (a subclass of CComboBoxEx which I have defined) to handle messages such as WM_CHAR, etc. However, when I use that combobox in a Dialog, my message handlers are not triggered by the user interactions which they are supposed to respond to. Any ideas on what is going on or how i can solve this problem would be much appreciated. Ben

        A Offline
        A Offline
        Alin Negru
        wrote on last edited by
        #3

        As I understood you have your own class CComboBoxEx in which you have implemented a handler for WM_CHAR, right? And more you want to use this combo in your dialog. Then if this is correct then add a combobox to your dialog by dragging it from the resource editor and add a member variable to that combo of the type CComboBox. Then go where your variable was added and change the variable from type CComboBox to CComboBoxEx. I hope I understood corectly your question...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups