Click here to Skip to main content
16,016,425 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sorting a vector Pin
peterchen23-May-02 7:05
peterchen23-May-02 7:05 
GeneralShow desktop Pin
obr23-May-02 5:22
obr23-May-02 5:22 
GeneralRe: Show desktop Pin
Joaquín M López Muñoz23-May-02 8:53
Joaquín M López Muñoz23-May-02 8:53 
GeneralRe: Show desktop Pin
obr23-May-02 19:26
obr23-May-02 19:26 
GeneralOpening urls in new browser window Pin
Chris Hambleton23-May-02 5:07
Chris Hambleton23-May-02 5:07 
GeneralRe: Opening urls in new browser window Pin
RobJones23-May-02 7:33
RobJones23-May-02 7:33 
GeneralRe: Opening urls in new browser window Pin
Chris Hambleton23-May-02 7:50
Chris Hambleton23-May-02 7:50 
GeneralATL/WTL message routing Pin
_Magnus_23-May-02 4:53
_Magnus_23-May-02 4:53 
Say you have a dialog with 2 member controls,
a listview and a listbox and both handles WM_LEFTBUTTONDOWN.

Then you think you could set up something like this
BEGIN_MSG_MAP(CMainDlg)
CHAIN_MSG_MAP_MEMBER(moList)
CHAIN_MSG_MAP_MEMBER(moListBox)
END_MSG_MAP()

but offcourse that will not work since moList will always get to handle
the message since it is first in the list.

The next thing you think of then is to check the HWND in each
off the classes WM_LBUTTONDOWN handlers and set bHandled to FALSE and
skip processing if it does not match.
(which is a soultion that is asking for problems when you start reusing the
classes since you will often forget to do that)

And that does not work either since the HWND is not passed on to the message
handler.

Is there some good standard soultion to this?
Or do i have to dig out the HWND some way?
Or (horrible tought) have to write a BEGIN_MSG_MAP macro that passes on the HWND?



/Magnus

GeneralRe: ATL/WTL message routing Pin
Tim Smith23-May-02 4:55
Tim Smith23-May-02 4:55 
GeneralRe: ATL/WTL message routing Pin
_Magnus_23-May-02 5:05
_Magnus_23-May-02 5:05 
GeneralRe: ATL/WTL message routing Pin
Tim Smith23-May-02 5:16
Tim Smith23-May-02 5:16 
GeneralRe: ATL/WTL message routing Pin
_Magnus_23-May-02 5:24
_Magnus_23-May-02 5:24 
GeneralRe: ATL/WTL message routing Pin
Tim Smith23-May-02 6:15
Tim Smith23-May-02 6:15 
GeneralRe: ATL/WTL message routing Pin
_Magnus_23-May-02 6:26
_Magnus_23-May-02 6:26 
GeneralRe: ATL/WTL message routing Pin
Tim Smith23-May-02 6:51
Tim Smith23-May-02 6:51 
GeneralRe: ATL/WTL message routing Pin
Magnus_23-May-02 7:21
Magnus_23-May-02 7:21 
GeneralRe: ATL/WTL message routing Pin
Joao Vaz23-May-02 23:25
Joao Vaz23-May-02 23:25 
GeneralRe: ATL/WTL message routing Pin
peterchen23-May-02 8:02
peterchen23-May-02 8:02 
GeneralRe: ATL/WTL message routing Pin
_Magnus_23-May-02 23:06
_Magnus_23-May-02 23:06 
GeneralRe: ATL/WTL message routing Pin
peterchen24-May-02 1:46
peterchen24-May-02 1:46 
Generalarray problem! Pin
tongc23-May-02 4:34
tongc23-May-02 4:34 
GeneralRe: array problem! Pin
Bill Wilson23-May-02 6:15
Bill Wilson23-May-02 6:15 
GeneralChanging default colour for edit ctrl Pin
Nnamdi Onyeyiri23-May-02 4:30
Nnamdi Onyeyiri23-May-02 4:30 
GeneralRe: Changing default colour for edit ctrl Pin
Ravi Bhavnani23-May-02 4:40
professionalRavi Bhavnani23-May-02 4:40 
GeneralRe: Changing default colour for edit ctrl Pin
Nnamdi Onyeyiri23-May-02 4:43
Nnamdi Onyeyiri23-May-02 4:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.