⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlg.c

📁 MiniGUI图形界面实验系列之对话框实验例程。
💻 C
字号:
#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <minigui/control.h>#define  IDC_DISP1	1001/* setting the dlg attrib */static  DLGTEMPLATE  DlgInitProgress ={   WS_BORDER | WS_CAPTION,    WS_EX_NONE,    20, 50, 200, 130,    "Dlg demo",     0,     0,    3,     NULL,    0    };/* control for dlg */static CTRLDATA CtrlInitData[] = {       {   "static",        WS_VISIBLE | SS_SIMPLE,	50,30,  100, 16,	IDC_DISP1,	"This is MiniGUI dlg!",	0,        WS_EX_NONE    },    {   "button",       WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON,       20,70,  70,25,       IDOK,       "OK",       0,       WS_EX_NONE    },    {   "button",       WS_TABSTOP | WS_VISIBLE,       110,70, 70,25,       IDCANCEL,       "CANCEL",       0,       WS_EX_NONE    }};static int  DialogBoxProc(HWND hdlg, int message, WPARAM wParam, LPARAM lParam){   switch(message)    {   case MSG_INITDIALOG:           return(1);	          case MSG_COMMAND:	   switch(wParam)	   {   case IDOK:	       case IDCANCEL:	          EndDialog(hdlg, wParam);                  DestroyAllControls(hdlg);	          break;	   }	   break;    }        return(DefaultDialogProc(hdlg, message, wParam, lParam));}static void  InitDialogBox(HWND hWnd){   DlgInitProgress.controls = CtrlInitData;    DialogBoxIndirectParam(&DlgInitProgress, hWnd, DialogBoxProc, 0L);}int  MiniGUIMain(int argc, const char *argv[]){   MSG Msg;#ifdef _LITE_VERSION    SetDesktopRect(0,0, 800,600);#endif    InitDialogBox(HWND_DESKTOP);    return(0);}#ifndef _LITE_VERSION	#include <minigui/dti.c>#endif

⌨️ 快捷键说明

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