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. GetComboBoxInfo implementation

GetComboBoxInfo implementation

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiocomhelpquestion
4 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

    Hi everyone ! Can you give an help hand , please ? I need an source code of GetComboBoxInfo function from here[^] Why ? Because I use that function in a project that I need compile on Windows NT SP6 , and there I don't have this function ... thank you very much .

    A 1 Reply Last reply
    0
    • M mesajflaviu

      Hi everyone ! Can you give an help hand , please ? I need an source code of GetComboBoxInfo function from here[^] Why ? Because I use that function in a project that I need compile on Windows NT SP6 , and there I don't have this function ... thank you very much .

      A Offline
      A Offline
      Andrew Brock
      wrote on last edited by
      #2

      Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like SetWindowText() is an alias for PostMessage(WM_SETTEXT), and it appears that GetComboBoxInfo() is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting.

      M 2 Replies Last reply
      0
      • A Andrew Brock

        Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like SetWindowText() is an alias for PostMessage(WM_SETTEXT), and it appears that GetComboBoxInfo() is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting.

        M Offline
        M Offline
        mesajflaviu
        wrote on last edited by
        #3

        Then perhaps you give me an alternative for this issue : I need to have ComboBoxInfo.hwndList handle for the follow function :

        void CComboBoxExt::PreSubclassWindow()
        {
        // TODO: Add your specialized code here and/or call the base class

        CComboBox::PreSubclassWindow();
        
        COMBOBOXINFO ComboBoxInfo;
        ComboBoxInfo.cbSize = sizeof(ComboBoxInfo);
        GetComboBoxInfo(m\_hWnd,&ComboBoxInfo);
        

        // m_Edit.SubclassWindow(ComboBoxInfo.hwndEdit);
        m_List.SubclassWindow(ComboBoxInfo.hwndList);
        SetProp(ComboBoxInfo.hwndList, WndPropertyComboBoxEx, this);
        fNextListProc = (WNDPROC)SetWindowLong(ComboBoxInfo.hwndList, GWL_WNDPROC, (LONG)WinProcForList); // <- here I need ComboBoxInfo.hwndList
        }

        and implementation of WinProcForList is here :

        LRESULT CComboBoxExt::WinProcForList(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
        {
        CComboBoxExt* pInstance = (CComboBoxExt*)GetProp(hWnd,WndPropertyComboBoxEx);
        ASSERT(pInstance != NULL);

        if(msg == LB\_FINDSTRING)
        {
        	TRACE("Replacing LB\_FINDSTRING with LB\_FINDSTRINGEXACT when looking for: \\"%s\\"\\n", (LPCTSTR)lParam);
        	msg = LB\_FINDSTRINGEXACT;
        }
        
        return CallWindowProc(pInstance->fNextListProc, hWnd, msg, wParam, lParam);
        

        }

        any help or hint I will very appreciated !

        1 Reply Last reply
        0
        • A Andrew Brock

          Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like SetWindowText() is an alias for PostMessage(WM_SETTEXT), and it appears that GetComboBoxInfo() is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting.

          M Offline
          M Offline
          mesajflaviu
          wrote on last edited by
          #4

          In fact , I try to deturn LB_FINDSTRING from dropdown list into LB_FINDSTRINGEXACT , and there must be an solution that function for Windows NT ... :(

          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