list boxes

Discussion in 'C++' started by ian, Oct 22, 2003.

  1. ian

    ian Guest

    hello all
    im currently learning windows programming
    im having trouble adding text to a combo list box

    im using the following with visual studio

    HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
    SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPCSTR)"Pencil");
    SendMessage(hwndList,CB_SETCURSEL,0,0);

    can anyone tell me what im doing wrong
    cheers
     
    ian, Oct 22, 2003
    #1
    1. Advertising

  2. ian

    Mike Wahler Guest

    Re: [OT, redir, welcome msg] list boxes

    "ian" <> wrote in message
    news:bn6nbu$ru3$...
    > hello all
    > im currently learning windows programming
    > im having trouble adding text to a combo list box
    >
    > im using the following with visual studio
    >
    > HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
    > SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPCSTR)"Pencil");
    > SendMessage(hwndList,CB_SETCURSEL,0,0);
    >
    > can anyone tell me what im doing wrong
    > cheers


    Answers available at newsgroup:

    comp.os.ms-windows.programmer.win32

    and/or

    microsoft.public.win32.programmer.ui

    Purpose of newsgroup comp.lang.c++ :

    http://www.slack.net/~shiva/welcome.txt

    -Mike
     
    Mike Wahler, Oct 22, 2003
    #2
    1. Advertising

  3. ian

    Andre Kostur Guest

    "ian" <> wrote in news:bn6nbu$ru3$1
    @newsg4.svr.pol.co.uk:

    > hello all
    > im currently learning windows programming
    > im having trouble adding text to a combo list box
    >
    > im using the following with visual studio
    >
    > HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
    > SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPCSTR)"Pencil");
    > SendMessage(hwndList,CB_SETCURSEL,0,0);
    >
    > can anyone tell me what im doing wrong


    Well... you're asking in the wrong place. comp.lang.c++ is for discussing
    the Standard C++ language, which has no concept of Windows or combo boxes.
    You'd be better off asking in a Microsoft newsgrop dedicated to Win32 API
    programming.
     
    Andre Kostur, Oct 22, 2003
    #3
  4. "ian" <> wrote...
    > hello all
    > im currently learning windows programming
    > im having trouble adding text to a combo list box
    > [...]
    > can anyone tell me what im doing wrong


    Yes. You're posting to a wrong newsgroup. This one is about
    C++ language, you need comp.os.ms-windows.programmer.

    Victor
     
    Victor Bazarov, Oct 22, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Mann

    Option Groups in List Boxes

    Ben Mann, Nov 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    333
    Chris Becker
    Nov 3, 2003
  2. Galina
    Replies:
    8
    Views:
    515
    Galina
    Feb 3, 2004
  3. Kay

    moving items between list boxes

    Kay, Feb 3, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,045
    =?Utf-8?B?QXZuZWVzaA==?=
    Feb 3, 2004
  4. Stefan Mueller
    Replies:
    5
    Views:
    12,526
    jamesxa
    Jun 16, 2009
  5. Matt Kruse
    Replies:
    1
    Views:
    209
    Calan
    Apr 6, 2004
Loading...

Share This Page