API Combo boxes... why won't a string be added? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

API Combo boxes... why won't a string be added?

I need a C++ combo box example without the MFC because however I create the combobox it won't add the strings to it.



Thanks

-Mike

{InFeStEd-ArCh0n}


Comments

  • Here's an example for you.



    #include <windows.h>

    int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE previnst,LPSTR cmdline,int cmdshow)

    {

    MSG msg;

    hwnd=CreateWindowEx(0,"COMBOBOX","",WS_VISIBLE|WS_BORDER,0,0,200,200,0,0,hInstance,0);

    SendMessage(hwnd,CB_ADDSTRING,0,"Blah");

    while(!GetMessage(&msg,0,0,0)) {

    if(msg.message==WM_KEYDOWN) break;

    TranslateMessage(&msg);

    DispatchMessage(&msg);

    }

    }


  • Thanks and I figured out the problem. Your name is not original by the way.



    -Mike

    {InFeStEd-ArCh0n}


Sign In or Register to comment.