-
CB_GETCURSEL problem
hi,
CB_GETCURSEL is alway returning zero although i have selected some nozero index... Why?
Code:
sel=SendMessage(dlg->hHost,CB_GETCURSEL,0,0);
When i open it in debug mode and see value of 'sel' after this statement it is always zero ... why??? what could be wrong...
dlg->hHost is HWND to combo box.
-
Looks fine, are you sure that the HWND you pass is a valid value ?
-
or try
iIndex = SendDlgItemMessage(hDialog , IDC_COMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM) 0); //use the ID# and the parents HWND