first_info.c

来自「自己学习时写的检测minigui的代码 希望可以帮助别人 我也是初学者」· C语言 代码 · 共 93 行

C
93
字号

#include "first.h"
static void InitDialog(HWND hWnd);static int InitDialogProc (HWND hDlg ,int message ,WPARAM wParam,LPARAM lParam);


static DLGTEMPLATE DlgNewInfo = 
{
	WS_VISIBLE | WS_CAPTION | WS_BORDER ,
	WS_EX_NONE ,
	120,180,400,160,
	"The new information  : ",
	0,
	0,
	5,
	NULL,
	0
};
static CTRLDATA  CtrlNewInfo []= 
{
	{
		"static",
		WS_VISIBLE,
		10,10,380,16,
		ID_DLGPROMOTEINFOCTRL,
		"Information : ",
		0
	},
	{
		"edit",
		WS_VISIBLE | WS_BORDER,
		10,40,155,40,
		ID_DLGNEWINFOCTRL1,
		"",
		0
	},
	{
		"edit",
		WS_VISIBLE | WS_BORDER,
		175,40,155,40,
		ID_DLGNEWINFOCTRL2,
		"",
		0
	},
	{
		"button",
		WS_VISIBLE |WS_BORDER,
		100,94,70,28,
		ID_DLGOKINFOCTRL,
		"OK",
		0
	},
	{
		"button",
		WS_VISIBLE | WS_BORDER,
		200,94,70,28,		ID_DLGCANCLEINFOCTRL,
		"Cancle",
		0
	}
};	
static void InitDialog(HWND hWnd){	DlgNewInfo.controls = CtrlNewInfo;	DialogBoxIndirectParam (&DlgNewInfo ,hWnd , InitDialogProc,0L);	printf("Use the Dialogue .......");}
static int InitDialogProc (HWND hDlg ,int message ,WPARAM wParam,LPARAM lParam){	switch(message)	{		case MSG_INITDIALOG:			return 1;		case MSG_COMMAND:			if(LOWORD(wParam) == ID_DLGOKINFOCTRL)			{			}					if(LOWORD(wParam) == ID_DLGCANCLEINFOCTRL)			{				EndDialog (hDlg,wParam);				printf("\nUse the Cancle\n");			}		break;			}		return DefaultDialogProc (hDlg,message,wParam,lParam);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?