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

C / C++ / MFC

 
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 
You need to use Contained Windows and Alternate Message Maps.

The "CContainedWindow" documentation sums this up pretty good

1) Add a member CContainedWindow m_wnd1, m_wnd2 to your class
(could also be CContainedWindow<mybaseclass>)

2) in your dlg CTor, call the CContainedWindow's CTor with
1) Window Class String for the window to create
2) this
3) a dialog-unique number, e.g. 1 and 2

3) add a message map like this:
BEGIN_MSG_MAP(CMyDialog)
   ...
   MESSAGE_HANDLER(WM_CREATE, OnCreate)
   ...
// Declare an alternate message map, identified by '1'
ALT_MSG_MAP(1)
   MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLBDown_FirstControl)
// Declare an alternate message map, identified by '2'
ALT_MSG_MAP(2)
   MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLBDown_SecondControl)
END_MSG_MAP()

that's it, pretty much.


The earth is not dying. It is being killed.
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 
GeneralRe: Changing default colour for edit ctrl Pin
Ravi Bhavnani23-May-02 4:47
professionalRavi Bhavnani23-May-02 4:47 
GeneralRe: Changing default colour for edit ctrl Pin
Nnamdi Onyeyiri23-May-02 4:56
Nnamdi Onyeyiri23-May-02 4:56 
GeneralRe: Changing default colour for edit ctrl Pin
Prem Kumar23-May-02 4:41
Prem Kumar23-May-02 4:41 
GeneralRe: Changing default colour for edit ctrl Pin
Nnamdi Onyeyiri23-May-02 4:47
Nnamdi Onyeyiri23-May-02 4:47 
GeneralRe: Changing default colour for edit ctrl Pin
Prem Kumar23-May-02 5:02
Prem Kumar23-May-02 5:02 
GeneralRe: Changing default colour for edit ctrl Pin
Nnamdi Onyeyiri23-May-02 5:22
Nnamdi Onyeyiri23-May-02 5:22 
QuestionHow to interact within 2 Dialogs? Pin
23-May-02 4:13
suss23-May-02 4:13 
AnswerRe: How to interact within 2 Dialogs? Pin
Ravi Bhavnani23-May-02 4:27
professionalRavi Bhavnani23-May-02 4:27 
GeneralRe: How to interact within 2 Dialogs? Pin
23-May-02 4:35
suss23-May-02 4:35 
GeneralRe: How to interact within 2 Dialogs? Pin
Ravi Bhavnani23-May-02 4:38
professionalRavi Bhavnani23-May-02 4:38 

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.