#2
rjsp2023-04-21 16:32
|
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
程序代码:
#include<windows.h>
#include<stdio.h>
#include"resource.h"
HINSTANCE hInstance=0;
BOOL CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int buffer1=0 ;
char* buffer2 = {0};
switch (msg)
{
case WM_INITDIALOG:
return TRUE;
case WM_CLOSE:
if (MessageBoxA(hDlg, "are you sure to close?", "Close?", MB_YESNO | MB_ICONQUESTION) == IDYES)
EndDialog(hDlg, 0);
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_EDIT1:
break;
case IDC_EDIT2:
break;
}
return TRUE;
}
return FALSE;
}
int main()
{
hInstance=GetModuleHandleA(NULL);
DialogBoxA(hInstance, (char*)IDD_DIALOG3, NULL, DlgProc);
return 0;
}
#include<stdio.h>
#include"resource.h"
HINSTANCE hInstance=0;
BOOL CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int buffer1=0 ;
char* buffer2 = {0};
switch (msg)
{
case WM_INITDIALOG:
return TRUE;
case WM_CLOSE:
if (MessageBoxA(hDlg, "are you sure to close?", "Close?", MB_YESNO | MB_ICONQUESTION) == IDYES)
EndDialog(hDlg, 0);
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_EDIT1:
break;
case IDC_EDIT2:
break;
}
return TRUE;
}
return FALSE;
}
int main()
{
hInstance=GetModuleHandleA(NULL);
DialogBoxA(hInstance, (char*)IDD_DIALOG3, NULL, DlgProc);
return 0;
}