|
-
August 4th, 2005, 01:45 PM
#1
[RESOLVED] CComboBoxEx - Droplist
Hello,
I am trying to use a CComboBoxEx with the Droplist type. I have added a message map handler for ON_CBN_SELCHANGE to handle a selection change, however my handler is never being called. If I change the type to Dropdown it is working properly.
Can anyone tell me how to handle selection changes for a Droplist type CComboBoxEx?
Thanks,
Jen
-
August 4th, 2005, 02:13 PM
#2
Re: CComboBoxEx - Droplist
The reason its not working is because the CComboBoxEx uses a notify handler, not a regular Combo box CBN_SELCHANGE. The message you want to handle is a CBEN_BEGINEDIT .
-
August 4th, 2005, 02:35 PM
#3
Re: CComboBoxEx - Droplist
I have also tried CBEN_BEGINEDIT with the same result: it works with Dropdown, but not with Drop List.
Jen
 Originally Posted by Mutilated1
The reason its not working is because the CComboBoxEx uses a notify handler, not a regular Combo box CBN_SELCHANGE. The message you want to handle is a CBEN_BEGINEDIT .
-
August 4th, 2005, 04:08 PM
#4
Re: CComboBoxEx - Droplist
Its a notification message so unless you are reflecting the message back to the control, it is the parent that is being notified not the control, which I suspect is why you don't get the message.
-
August 5th, 2005, 02:00 PM
#5
Re: CComboBoxEx - Droplist
But I am handling the message with the parent window, I have not subclassed the CComboBoxEx. That also does not explain why it would work when the type is Dropdown type but not when it is Drop List.
Thanks for your replies,
Jen
-
August 5th, 2005, 02:09 PM
#6
Re: CComboBoxEx - Droplist
 Originally Posted by jeh
If I change the type to Dropdown it is working properly.
That should not be a case. Create new default application, do not change anything and try to handle the same message changing combo style. See if it behaves differently than
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
August 5th, 2005, 03:11 PM
#7
Re: CComboBoxEx - Droplist
 Originally Posted by JohnCz
That should not be a case. Create new default application, do not change anything and try to handle the same message changing combo style. See if it behaves differently than
It seems you are correct, in the basic application it is working properly. Thank you, at least now I have something to compare to.
Jen
-
August 8th, 2005, 09:45 AM
#8
Re: CComboBoxEx - Droplist
Thank you all for you help. I am embarrassed to say that the problem was with the resource id. There was a range of ids preceding the one selected for the combo box that was reserved for a custom control. It turns out I had an off by one error, and the id of the combo box should have been included in that reserved range.
Jen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|