Hello All,

I am adding values 0,1,3 to a combo box in Initdialog

switch(Message)
{
case WM_INITDIALOG:
{
HWND hwndCombo = GetDlgItem(hwnd, IDC_CB);
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "0");
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "1");
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "2");
}



in other function I want to use the value of the combo box, (user selected item) for that I am using below code

int F;
HWND HCBF = GetDlgItem(hwnd, IDC_CB);
SendMessage(HCBF , CB_GETITEMDATA,(WPARAM)F, 0);


This code has no error but I am getting some junk value and i am not geting the values 0,1,2
Can u please tell me what is the error in the above code ???


Thanking you,

Suresh HC.