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

📄 hellow.c

📁 这是一个MINITGUI2。0的应用程序
💻 C
字号:
#include <stdio.h>#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <hellow.h>#include "first.c"static HWND hMainWnd;static DLGTEMPLATE DlgPropSheet;static CTRLDATA CtrlPropSheet[];static DLGTEMPLATE DlgPropSheet ={    WS_BORDER | WS_CAPTION,    WS_EX_NONE,    0, 0, 640, 480,#ifdef _LANG_ZHCN    "ϵͳÐÅÏ¢",#else    "ship pos",#endif    0, 0,    3, NULL,    0};static CTRLDATA CtrlPropSheet[] ={     {        CTRL_PROPSHEET,        WS_VISIBLE | PSS_COMPACTTAB,         10, 10, 390, 200,        IDC_PROPSHEET,        "",        0    },    {        CTRL_BUTTON,        WS_VISIBLE | BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP,        10, 220, 140, 25,        IDOK,         "total",        0    },    {        CTRL_BUTTON,        WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP,        260, 220, 140, 25,        IDCANCEL,        "cancle",        0    },};int InitialPos(void);static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam){   	HDC hdc;	printf("now in hellowinproc\n");   	switch (message) {       	case MSG_PAINT:          	hdc = BeginPaint (hWnd);          	TextOut (hdc, 60, 60, "Hello world!");		InitialPos();          	EndPaint (hWnd, hdc);          return 0;       	case MSG_CLOSE:          	DestroyMainWindow (hWnd);          	PostQuitMessage (hWnd);          return 0;   	}   	return DefaultMainWinProc(hWnd, message, wParam, lParam);}//static MAINWINCREATE CreateInfo;int MiniGUIMain (int argc, const char* argv[]){   	MSG Msg;   	   	MAINWINCREATE CreateInfo;#ifdef _MGRM_PROCESSES   JoinLayer(NAME_DEF_LAYER , "helloworld" , 0 , 0);#endif   	CreateInfo.dwStyle = WS_VISIBLE | WS_BORDER | WS_CAPTION;   	CreateInfo.dwExStyle = WS_EX_NONE;   	CreateInfo.spCaption = "cigarate pos";   	CreateInfo.hMenu = 0;   	CreateInfo.hCursor = GetSystemCursor(0);   	CreateInfo.hIcon = 0;   	CreateInfo.MainWindowProc = HelloWinProc;   	CreateInfo.lx = 0;   	CreateInfo.ty = 0;   	CreateInfo.rx = 640;   	CreateInfo.by = 480;   	CreateInfo.iBkColor = COLOR_lightwhite;   	CreateInfo.dwAddData = 0;   	CreateInfo.hHosting = HWND_DESKTOP;   	hMainWnd = CreateMainWindow (&CreateInfo);		printf("now in miniauimain\n");   	if (hMainWnd == HWND_INVALID)       		return -1;   	ShowWindow(hMainWnd, SW_SHOWNORMAL);   	while (GetMessage(&Msg, hMainWnd)) {       		TranslateMessage(&Msg);       		DispatchMessage(&Msg);   	}   	MainWindowThreadCleanup (hMainWnd);   	return 0;}#ifndef _MGRM_PROCESSES#include <minigui/dti.c>#endif

⌨️ 快捷键说明

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