hi!
I'm kind of new to this site, but I saw some of your guys posts, and man, you are brilliant. so I hope someone can help me as well. I am doing a vc++ program, and I'm using many comboboxs. how can I tell between them? I mean, I want to know in case WM_COMMAND, witch combobox has just been changed.
I'll be ever so grateful if anyone can help me here!!;)

Recommended Answers

All 5 Replies

you gave each combobox a unique id when you created it. Just use it.

what version of vc++ are you using?

There are a lot of combo box messages See this MSDN article

Can't you just double click each combobox and edit the code for when each combobox is changed? It might provide you with a different event by default, not sure, but I think there is one for combobox changed.

Regards.

~Tyler S. Breton

Tyler: that would be horribly inefficient. Windows message contains the ID to the combo box that was changed.

hi!
I'm kind of new to this site, but I saw some of your guys posts, and man, you are brilliant. so I hope someone can help me as well. I am doing a vc++ program, and I'm using many comboboxs. how can I tell between them? I mean, I want to know in case WM_COMMAND, witch combobox has just been changed.
I'll be ever so grateful if anyone can help me here!!;)

I dont know but if you are using WIN32
With WM_COMMAND notification, you can have a look of lParam.

lParam Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.

thank you for your help, found what I was looking for and this is it :

if (LOWORD (wParam) == DAY_COMBOBOX && HIWORD (wParam) == LBN_SELCHANGE)

Thank You :cheesy:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.