Thread: ComboBox Height

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    A.I Programmer
    Join Date
    Mar 2007
    Location
    Teresina - Brazil
    Posts
    47
    Code:
    case WM_CREATE:
    {
        HWND ComboBox;
    
        ComboBox = CreateWindow("COMBOBOX","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN,10,10,160,17,hwnd,(HMENU)ID_COMBOBOX,GetModuleHandle(NULL),NULL);
             
         SendMessage(ComboBox,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)"Teste1");
         SendMessage(ComboBox,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)"Teste2");
         SendMessage(ComboBox,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)"Teste3");
         SendMessage(ComboBox,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)"Teste4");
             
         WPARAM Font = (WPARAM)GetStockObject(DEFAULT_GUI_FONT);
             
         SendMessage(ComboBox,WM_SETFONT,Font,MAKELPARAM(FALSE,0));
    }break;
    The height is fixed, always...

  2. #2
    Registered User mikeman118's Avatar
    Join Date
    Aug 2007
    Posts
    183
    Maybe somewhere later in the code you send a message to resize it? How do you know it's ten pixels? (or is it just not very big?)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM