[C++]C++学習ノート
1170 ワード
C++学習ノート
include “windows.h”
include “resource.h”
int LCY()/LCYコード関数************************************************{return 0;}
INT_PTR CALLBACK MainDlgProc(HWND hDlg,UINT uMsg,WPARAMwParam,LPARAM lParam){BOOL bRet=true;switch(uMsg){case WM_CLOSE:{UINT nRet=MesageBox(hDlg,『クローズ確認?』,ヒント、MB_OKCANCEL | MB_ICONERROR); if (nRet == IDOK) { EndDialog(hDlg, 0); break; }
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hprevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, MainDlgProc); }
include “windows.h”
include “resource.h”
int LCY()/LCYコード関数************************************************{return 0;}
INT_PTR CALLBACK MainDlgProc(HWND hDlg,UINT uMsg,WPARAMwParam,LPARAM lParam){BOOL bRet=true;switch(uMsg){case WM_CLOSE:{UINT nRet=MesageBox(hDlg,『クローズ確認?』,ヒント、MB_OKCANCEL | MB_ICONERROR); if (nRet == IDOK) { EndDialog(hDlg, 0); break; }
else if (nRet == IDCANCEL)
{}
}
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDOK :
UINT nRet = MessageBox(hDlg, " ?", " ", MB_OKCANCEL | MB_ICONERROR);
if (nRet == IDOK)
{
MessageBox(hDlg, " ……", " ",0);
LCY(); // LCY **************************************
MessageBox(hDlg, " !!!", " ", 0);
break;
}
else if (nRet == IDCANCEL)
{}
}
}
default:
bRet = FALSE;
}
return bRet;
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hprevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, MainDlgProc); }