CListBox Properties
-
hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
-
hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
question is not clear.
-
hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
Can you be more specific_**
**_
whitesky
-
hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
hiiiiiiiiiii, this is the solution... u have to do is: 1) u need to Dervie a class from CListBox 2) map the listbox in ur application to Derived listbox class. 3)Override the virtual function OnChar in ur Derived class. void CMyListBox::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default //CListBox::OnChar(nChar, nRepCnt, nFlags); important } comment this code CListBox::OnChar(nChar, nRepCnt, nFlags); Regards Prashanth.v
-
hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
Try this way. Using Add Class command, add a new MFC class derived from
CListBox
. Then add to this class a handler forWM_CHAR
notifications. In this handler, return without calling anything. In the dialog box where list box is used, select the list-box and then use Add Variable in order to add a control variable. In the Variable Type field, specify the name of your list-box class. If you already have a variable for your list, then open the header file of your dialog and replaceCListBox
type with the name of your list-box class. Hope it helps. -
hiiiiiiiiiii, this is the solution... u have to do is: 1) u need to Dervie a class from CListBox 2) map the listbox in ur application to Derived listbox class. 3)Override the virtual function OnChar in ur Derived class. void CMyListBox::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default //CListBox::OnChar(nChar, nRepCnt, nFlags); important } comment this code CListBox::OnChar(nChar, nRepCnt, nFlags); Regards Prashanth.v