WM_COMMAND from Combobox??
I have a combobox which I have inserted strings into. I have it so that it recognizes when I hit the box, I just don''t know how to get it to recognize which index item is being selected. How do I set up the
case WM_COMMAND:
section, or what obvious other thing could I have overlooked (it''s been known to happen )?
Thanks in advance;
Prairie
The combobox will send a CBN_SELCHANGE as the notify code of the WM_COMMAND message (the notify code is in the high word of WM_COMMANDS WPARAM). You can then use CB_GETCURSEL to get the index of the selected item.
Thanks for the advice, here's the current goal
I have an integer i,
on a CB_SELCHANGE message I then call
i = SendMessage(CategoryCombobox,CB_GETCURSEL,0,0);
I want to do something depending on the index number.
if(i==2)
{
MessageBox(hwnd,"got it","Category",NULL);
}
and that isn't working.
any suggestions??
Thanks again,
Prairie
Edited by - Prairie on August 25, 2000 12:52:19 PM
I have an integer i,
on a CB_SELCHANGE message I then call
i = SendMessage(CategoryCombobox,CB_GETCURSEL,0,0);
I want to do something depending on the index number.
if(i==2)
{
MessageBox(hwnd,"got it","Category",NULL);
}
and that isn't working.
any suggestions??
Thanks again,
Prairie
Edited by - Prairie on August 25, 2000 12:52:19 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement