Capture LButtonUp in a CListBox ??
-
Hi, I have at CListBox in a dialog box but I'm not able to capture mouse click (ex. LButtonUp() ) ? Context-menu works fine on the mouse right click. Can anybody help me ?
If the List box does not provide a way handle a message - WM_LBUTTONUP message in your case, you will have to use subclassing (write your own message procedure) for this control. See the articles on subclassing here at CP, or at msdn.microsoft.com... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
-
If the List box does not provide a way handle a message - WM_LBUTTONUP message in your case, you will have to use subclassing (write your own message procedure) for this control. See the articles on subclassing here at CP, or at msdn.microsoft.com... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
Have MFC subclass it for you with a DDX_Control statment, if its based on a resource: 1. Derive a class from CListBox 2. Double click on the list box in the resource editor with CTRL held down 3. Select control 4. Select your new derived list box class 5. Give it a name Then use class wizard to add a handler to your LB for WM_LBUTTONUP to your new LB