sri_darr
asked on
Masked Combo Box
My requirement ins simple .. but I just dunno how to get this done. All I need is a Mask Combo Box. ie. I have a DropDownList (style) combo box. So I let users select from its list or type a value. But I want to restrict a few characters from getting typed.
I thought of having my MaskCombo class overriding PreTranslateMessage. I can trap the key and if it is one of the restricted chars I can return ZERO. But since I need only a few valid chars., I'd have to put in a whole lot of things to restrict. I dont want to do this.
Let me put this in simpler words. How do I restrict the user input to just Numbers, "-" and A to Z (Caps) ONLY !
I thought of having my MaskCombo class overriding PreTranslateMessage. I can trap the key and if it is one of the restricted chars I can return ZERO. But since I need only a few valid chars., I'd have to put in a whole lot of things to restrict. I dont want to do this.
Let me put this in simpler words. How do I restrict the user input to just Numbers, "-" and A to Z (Caps) ONLY !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
migel: why can't he create CListBox derive class and manipulate the key down in windowProc?
ASKER
Thanks migel.... With that article and a li'l bit of trial codes I was able to acheive this. The right direction is what I needed. Thanks again.
PS: I searched on this "Subclass AND ComboBox" and I cant believe I missed this topic in that whole list.
PS: I searched on this "Subclass AND ComboBox" and I cant believe I missed this topic in that whole list.