Hi,
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.

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, in your parent window's class, it will override reflected message handlers for the same message provided you don't call the base class handler function in your own handler. For example, if you handle WM_CTLCOLOR in your dialog box class, your handling will override any reflected message handlers.

See more at this link

ok thanks for the quick reply..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.