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. GetDlgItemText in an derived CComboBox

GetDlgItemText in an derived CComboBox

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 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

    I try to make an CComboBoxExt derived from CCOmboBox . In

    void CComboBoxExt::OnEditchange()
    {
    // TODO: Add your control notification handler code here

    CString sText;
    GetDlgItemText(this?,sText);
    ShowDropDown();
    

    }

    I try to retrive the text that user entered in combobox , and if text is not empty show drop down list , if is empty then hide drop down list .. but I stuck on GetDlgItemText method : how can I retrieve the text that user entered ? Can you help me please ? Thank you !

    H 1 Reply Last reply
    0
    • M mesajflaviu

      I try to make an CComboBoxExt derived from CCOmboBox . In

      void CComboBoxExt::OnEditchange()
      {
      // TODO: Add your control notification handler code here

      CString sText;
      GetDlgItemText(this?,sText);
      ShowDropDown();
      

      }

      I try to retrive the text that user entered in combobox , and if text is not empty show drop down list , if is empty then hide drop down list .. but I stuck on GetDlgItemText method : how can I retrieve the text that user entered ? Can you help me please ? Thank you !

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      To retrieve text from the edit box of the CComboBox, use GetWindowText(). To retrieve text from the listbox, use GetLBText().

      Best wishes, Hans


      [Hans Dietrich Software]

      M 1 Reply Last reply
      0
      • H Hans Dietrich

        To retrieve text from the edit box of the CComboBox, use GetWindowText(). To retrieve text from the listbox, use GetLBText().

        Best wishes, Hans


        [Hans Dietrich Software]

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

        Thanks . Goes well.

        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