#include "stdafx.h"#include "iostream"#include <windows.h>#include <windowsx.h>#include "resource.h"#include "MainDlg.h"using namespace std;BOol WINAPI Main_Proc(HWND hWnd,UINT uMsg,WParaM wParam,LParaM lParam){ switch(uMsg) { HANDLE_MSG(hWnd,WM_INITDIALOG,Main_OnInitDialog); HANDLE_MSG(hWnd,WM_COMMAND,Main_OnCommand); HANDLE_MSG(hWnd,WM_CLOSE,Main_OnClose); } return FALSE;}BOol Main_OnInitDialog(HWND hwnd,HWND hwndFocus,LParaM lParam){ return TRUE;}voID Main_OnCommand(HWND hwnd,int ID,HWND hwndCtl,UINT codeNotify){ TCHAR name1[101]; TCHAR name2[101]; TCHAR name3[101]; int sum,n1,n2; switch(ID) { case IDC_OK: GetDlgitemText(hwnd,IDC_EDIT1,name1,sizeof(name1)); GetDlgitemText(hwnd,IDC_EDIT2,name2,sizeof(name2)); n1=atoi(name1); n2=atoi(name2); sum=n1+n2; wsprintf(name3,"%i",sum); SetDlgitemText(hwnd,IDC_EDIT3,name3); break; default: break; }}voID Main_OnClose(HWND hwnd){ EndDialog(hwnd,0);}总结
以上是内存溢出为你收集整理的尼玛终于熬过头了从VB走过再次看见窗体的喜悦 SDK加法计算器全部内容,希望文章能够帮你解决尼玛终于熬过头了从VB走过再次看见窗体的喜悦 SDK加法计算器所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)