Dear visitor who can read English
This page is a page translated automatically by Google AJAX Language API.
Please comment to this page if you could not understand. A PERSON will review this page .
I think that you will be able to understand this page later. Please give a little time to us.
Best regards,
This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]
PIKUCHAKONTORORU and paste controls and a slider (like the message below) may cause compilation errors of the resource.
This is, COMMCTRL as often happens, if the header does not load properly.
(There are problems with simple configuration.
)
error RC2104: undefined keyword or key name: WC_STATIC
[Tools]
- [Option]
[Solutions and Projects
(Left) - [include]
(Right screen) In, Microsoft Platform SDK's include directory to the top, I'll have a strong position.
% Platform SDK installation directory% \ include Example) C: \ Program Files \ Microsoft Platform SDK \ Include
Then, please try to rebuild implementation.
I will not be in error.
Add a new button handler
The VC + +, OK after the handler of the button will be added.
[MainDlg.h add]
1
2
3
4
5
6
7
8
9
10
11
12
BEGIN_MSG_MAP(CMainDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog):
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)// add following line.
COMMAND_ID_HANDLER(IDC_BUTTON1, OnThankYou)
END_MSG_MAP()::
LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL&/*bHandled*/);// 以下の1行を追加!!
LRESULT OnThankYou(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL&/*bHandled*/);
[MainDlg.cpp added to the last line]
1
2
3
4
5
LRESULT CMainDlg::OnThankYou(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL&/*bHandled*/){
MessageBox("ThankYou");return0;}
Try to build and run
To build, I could easily see a message box and try to run.
So far, it was very easy.
If you use MFC, many small parameter of this handler will be surprised.
COMMAND_ID_HANDLER macro definitions and further?
.
I will certainly work to the same, wParam of a low not seen it.
MFC actually, is to be expanded as follows: To the same, wParam of a high "BN_CLICKED" after you check in, I should call the handler.
However, this is good, but now, here is precisely because we, then, MFC I want to close.
(WTL in the handler are equivalent to define it.
)
[dlgtestDlg.h added to the end of]
1
2
3
4
:public:
afx_msg void OnThankYou();:
[dlgtestDlg.cpp add]
1
2
3
4
5
6
7
8
9
10
11
12
13
BEGIN_MESSAGE_MAP(CdlgtestDlg, CDialog)://}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_BUTTON1, OnThankYou)
END_MESSAGE_MAP():::void CdlgtestDlg::OnThankYou(){// TODO : ...
MessageBox("ThankYou");}
Leave a Reply