CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Nov 2010

    [RESOLVED] let the user modify a ComboBox string

    Hi people, i'm just starting with vc++ programming and i would like to know if there any way
    to let the user modify a combo box list, i mean let them modify strings and also add as many strings as they wish.
    If i could read the edit box when the user modify some string my problem would be almost solved.

    I've tried using CString m_choice;
    m_combobox.GetLBText(m_combobox.GetCurSel(), m_choice);

    and of course didn't work, i guess cause doesn't exist and index to my case.

    And also tried using m_combobox.SetEditSel(0, -1);
    that one did work, but i have the string in the clipboard, in CF_TEXT format, wich is not practical.

    Any help would be really appreciated, thanks for your time.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Hanover Germany

    Re: let the user modify a ComboBox string

    GetLBText gives you a string from the list box of a combo box.
    To get a string from the edit box - use GetWindowText.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2010

    Re: let the user modify a ComboBox string

    Thanks Victor for your help, with a few words u have solve my problem

    Using CString m_choice;
    i've got what i was looking for.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.