Thread: Get current selection from combobox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    37

    Get current selection from combobox

    I cannot get the value of the item selected in a combobox.....
    whats wrong? is it the integer number? should it be a pointer, an array?
    I tried it all but non seems to work

    Code:
    
    switch (Message)
        { 
           case WM_COMMAND:
             {
    	switch(LOWORD(wParam))
    	{
                                               
    	  case IDC_CON:
    	  { 
                         number = SendMessage(hCombo,CB_GETCURSEL, 0,0); //Global variable
                        
                      }break;
                    } 
            }break;
         }
    //
    Note: it is the first time I am using comboboxes and I have referrenced from MSDN

    Compiler : DEV C++
    OS: WIN XP
    Last edited by Sober; 05-04-2007 at 08:48 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 12:52 PM
  2. Problem with simple case statements
    By shoobsie in forum C Programming
    Replies: 2
    Last Post: 05-08-2006, 08:39 AM
  3. compiler build error
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-30-2003, 10:16 AM
  4. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  5. HelpMePlease
    By Prncess100 in forum C++ Programming
    Replies: 6
    Last Post: 12-11-2002, 02:02 PM