[RESOLVED] let the user modify a ComboBox string
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: [RESOLVED] let the user modify a ComboBox string

  1. #1
    Join Date
    Nov 2010
    Posts
    2

    [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);
    m_combobox.Copy();
    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
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,288

    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
    Posts
    2

    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;
    m_combobox.GetWindowText(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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center