對話框按鈕簡單使用實例
需要先添加對話框,并且修改確定按鈕的ID值
.h文件
struct DecodeUint{
};
#define dim(x) (sizeof(x)/sizeof(x[0]))
LONG OnInit(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LONG OnCommand(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LONG OnClose(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LONG OnBtnClick(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
.c文件
#include
#include
#include "Border.h"
#include "resource.h"
#include
struct DecodeUint DlgMessage[] = {
};
struct DecodeUint DlgCommand[] = {
};
HINSTANCE g_hInst;
HWND hStatic;
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
int WinMain(HINSTANCE hInstance,
{
}
BOOL CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
}
LONG OnCommand(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
}
LONG OnInit(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
}
LONG OnClose(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
}
LONG OnBtnClick(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
}