?? dti.c
字號:
//// dti.c: this file defines the desktop interface funtions.//// You should always include the file in your projects.//// Copyright (c) 1999, 2000, Mr. Wei Yongming.////#include <stdio.h>#include <stdlib.h>#include <string.h>#include <pthread.h>#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>/* * MiniGUI will call PreInitGUI on startup time. * You can do something before GUI by implementing this function. * Please return TRUE to continue initialize MiniGUI. */#ifndef DONT_USE_SYS_PREINITGUIBOOL PreInitGUI (int args, const char* arg [], int* retp){ return TRUE;}#endif/* * MiniGUI will call PostTerminateGUI after switch text mode. * You can do something after GUI by implementing this function. * rcByGUI will be the return code of this program. */#ifndef DONT_USE_SYS_POSTTERMINATEGUIint PostTerminateGUI (int args, const char* arg [], int rcByGUI){ return rcByGUI;}#endif/* * When the user clicks right mouse button on desktop, * MiniGUI will display a menu for user. You can use this * function to customize the desktop menu. e.g. add a new * menu item. * Please use an integer larger than IDM_DTI_FIRST as the * command ID. */#ifndef DONT_USE_SYS_CUSTOMIZEDESKTOPMENU#define IDC_DTI_ABOUT (IDM_DTI_FIRST)void CustomizeDesktopMenu (HMENU hmnu, int iPos){#ifdef _MISC_ABOUTDLG MENUITEMINFO mii; memset (&mii, 0, sizeof(MENUITEMINFO)); mii.type = MFT_STRING; mii.id = IDC_DTI_ABOUT; mii.typedata = (DWORD)GetSysText(SysText [19]); mii.hsubmenu = 0; InsertMenuItem (hmnu, iPos, TRUE, &mii);#endif}/* * When user choose a custom menu item on desktop menu, * MiniGUI will call this function, and pass the command ID * of selected menu item. */int CustomDesktopCommand (int id){#ifdef _MISC_ABOUTDLG if (id == IDC_DTI_ABOUT) OpenAboutDialog ();#endif return 0;}#endif/* * This function translates system strings. * You can use gettext to return the text. * * System text as follows: * const char* SysText [] = { "Windows...", // 0 "Start...", // 1 "Refresh Background", // 2 "Close All Windows", // 3 "End Session", // 4 "Operations...", // 5 "Minimize", // 6 "Maximize", // 7 "Restore", // 8 "Close", // 9 "OK", // 10 "Next", // 11 "Cancel", // 12 "Previous", // 13 "Yes", // 14 "No", // 15 "Abort", // 16 "Retry", // 17 "Ignore", // 18 "About MiniGUI...", // 19 NULL }; */#ifndef DONT_USE_SYS_GETSYSTEXTstatic const char* SysText_GB [] ={ "窗口...", // 0 "開始...", // 1 "刷新背景", // 2 "關閉所有窗口", // 3 "結束會話", // 4 "窗口操作...", // 5 "最小化", // 6 "最大化", // 7 "恢復", // 8 "關閉", // 9 "確定", // 10 "下一步", // 11 "取消", // 12 "上一步", // 13 "是(Y)", // 14 "否(N)", // 15 "終止(A)", // 16 "重試(R)", // 17 "忽略(I)", // 18 "關于 MiniGUI..." // 19};static const char* SysText_BIG5 [] ={ "怠
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -