I inherit the class called ListBox form CListBox and by using this class object I create a listbox containing two items in the listbox.when ever i select the item from the listbox the generated message should be handled by the control window by using WM_CONTROL_REFLECT mesage in ListBox message map.and this message is also handled in cDialog class(dialog based application) with ON_CONTROL statement.
My question is if parent class have no message handling function to that message(LBN_DBLCLK), then control class class will handle it.if parent and control class also contain this message handle function, which one can execute?
thanks in advance.
Jump to Post
If you handle the event in your derived class then your derived class will get the event, not the parent(s). Parent class will only get the event if your derived class calls it.
If you have supplied a handler for a specific message, or for a range of messages, …
All 2 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.