From WTL to MFC (2) trap the wizard (dialog Chapter)
Published on| May 5th, 2009 | No Comment.
Categories:WTL |
(atlclack.h MESSEJIMAPPUMAKURO Most are defined. )
Using it to make changes as follows.
[MainDlg.h Change]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | BEGIN_MSG_MAP(CMainDlg) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) : COMMAND_ID_HANDLER(IDCANCEL, OnCancel) // add following line. //COMMAND_ID_HANDLER(IDC_BUTTON1, OnThankYou) COMMAND_HANDLER_EX(IDC_BUTTON1, BN_CLICKED,OnThankYou) END_MSG_MAP() : : LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); // replace following line. // LRESULT OnThankYou(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); void OnThankYou(UINT uNotifyCode, int nID, CWindow wndCtl); |
[MainDlg.cpp Change]
1 2 3 4 5 6 | //LRESULT CMainDlg::OnThankYou(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) void CMainDlg::OnThankYou(UINT uNotifyCode, int nID, CWindow wndCtl) { MessageBox("ThankYou"); // return 0; } |
Trap Wizard (2)
And the following error while compiling.
I will do in stdafx.h and add the following.
Okay and I OMOIKI This will output the following error when you run the compiled.
This is, WTL80 or problems? It is unknown, the map defined start, "BEGIN_MSG_MAP" rather than "BEGIN_MSG_MAP_EX" is a must use.
As far as the documentation is in, WTL7.0 later, "BEGIN_MSG_MAP" but "BEGIN_MSG_MAP_EX" There is also described as good, in fact, in accordance with the document notes that "BEGIN_MSG_MAP_EX" I do not have to be.
And to do this, you should complete the build.
And the following error while compiling.
error C3867: 'CMainDlg:: OnThankYou': There is no function call argument list.
To create a pointer to the Members' & CMainDlg:: OnThankYou 'Please use the
error C2143: syntax error: '; 'A' break 'not before.
error C3861: 'COMMAND_HANDLER_EX': identifier not found
Was created by the wizard, by default, WTL header and do not capture the MESSEJIMAPPUMAKURO.
error C2143: syntax error: '; 'A' break 'not before.
error C3861: 'COMMAND_HANDLER_EX': identifier not found
I will do in stdafx.h and add the following.
1 2 3 4 5 | : #include <atldlgs.h> // add #include <atlcrack.h> // WTL enhanced msg map macros : |
Okay and I OMOIKI This will output the following error when you run the compiled.
error C3861: 'SetMsgHandled': identifier not found
error C3861: 'IsMsgHandled': identifier not found
error C3861: 'IsMsgHandled': identifier not found
This is, WTL80 or problems? It is unknown, the map defined start, "BEGIN_MSG_MAP" rather than "BEGIN_MSG_MAP_EX" is a must use.
As far as the documentation is in, WTL7.0 later, "BEGIN_MSG_MAP" but "BEGIN_MSG_MAP_EX" There is also described as good, in fact, in accordance with the document notes that "BEGIN_MSG_MAP_EX" I do not have to be.
And to do this, you should complete the build.
Trap? Nothing that is not simple, and it has to鵜呑MI the wizard, when you customize, me, and I would appreciate you KUMITOっin the sense that I care.
In fact, WTL, not to use the Wizard, ATL and I can catch and keep the chaos to create a simple wizard screens.
MFC Wizard, after using the Wizard, MFC can use the most, WTL wizard is after using the Wizard, ATL and I have to get the most use That kind of power.
You might also like:
Trackback URL
After Admin approves this comment, it will be shown.
Comments
Leave a Reply
