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. There is a method to get m_hWnd of CComboBox ?

There is a method to get m_hWnd of CComboBox ?

Scheduled Pinned Locked Moved C / C++ / MFC
comquestionlearning
2 Posts 2 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.
  • M Offline
    M Offline
    mesajflaviu
    wrote on last edited by
    #1

    There is a method to get m_hWnd of dropdown list of CComboBox , of course , except GetComboBoxInfo(...) ? I need to get that handle to work on Windows NT SP6 , and there I haven't COMBOBOXINFO struct and GetComboBoxInfo ... :( I try this[^] method , but is not good for me for two reason : 1. Don't function 'nCtlColor == CTLCOLOR_LISTBOX' part , I don't know why 2. This handle will be avaiable only after I clicked to dropdown button of CComboBox , and I needed in PreSublclassWindow already . Thank you .

    N 1 Reply Last reply
    0
    • M mesajflaviu

      There is a method to get m_hWnd of dropdown list of CComboBox , of course , except GetComboBoxInfo(...) ? I need to get that handle to work on Windows NT SP6 , and there I haven't COMBOBOXINFO struct and GetComboBoxInfo ... :( I try this[^] method , but is not good for me for two reason : 1. Don't function 'nCtlColor == CTLCOLOR_LISTBOX' part , I don't know why 2. This handle will be avaiable only after I clicked to dropdown button of CComboBox , and I needed in PreSublclassWindow already . Thank you .

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      I don't know the answer, but I will give you a few ideas. Are you sure this is not just an SDK version problem? Have you tried sending the CB_GETCOMBOBOXINFO to the combobox on WinNT? If it's not in the SDK, you can define it along with a COMBOBOXINFO struct and then send the message for testing purposes. Nothing bad will happen, and you will see if the COMBOBOXINFO data changes. If it does, fine, if it doesn't you will need another approach. Most of the MSDN documentation says minimum supported client = Windows 2000 professional, even though the messages has been around since at least Win 3.1. AddString[^] example. Are you sure the list box is even created when you want to subclass the control? Finally, have a look at the implementation of a ComboTree[^].

      home

      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