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

📄 dti.c

📁 在ecos 下mingui 的移植开发
💻 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 + -