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

📄 vcongui.c

📁 MINI GUI1.6X源码
💻 C
字号:
/*** $Id: vcongui.c,v 1.15 2003/08/15 08:45:46 weiym Exp $**** Virtual Console on MiniGUI.**** Copyright (C) 1999 ~ 2002 Wei Yongming** Copyright (C) 2003 Feynman Software.** ** Create date: 1999.09.23*/ /***  This source is free software; you can redistribute it and/or**  modify it under the terms of the GNU General Public**  License as published by the Free Software Foundation; either**  version 2 of the License, or (at your option) any later version.****  This software is distributed in the hope that it will be useful,**  but WITHOUT ANY WARRANTY; without even the implied warranty of**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU**  General Public License for more details.****  You should have received a copy of the GNU General Public**  License along with this library; if not, write to the Free**  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,**  MA 02111-1307, USA*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <popt.h>#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <minigui/control.h>#include <minigui/vcongui.h>static void usage (void){    MessageBox (HWND_DESKTOP,             "\nUsage: vcongui [--row <rows>] [--col <columns>]"            " [<prog> [<options>]]\n\n"            "       <rows>    is the rows of terminal, \n"            "       <columns> is the columns of terminal.\n"            "       <prog>    is the startup program and\n"            "       <options> are the options of the program.\n\n",            "Bad arguments!",            MB_OK | MB_ICONEXCLAMATION);}int MiniGUIMain (int args, const char* arg[]){#ifdef _LITE_VERSION    CHILDINFO ChildInfo = {0, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0};#else    CHILDINFO ChildInfo = {0, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0};#endif    poptContext optCon;    int rc;    struct poptOption options[] = {        { "row", '\0', POPT_ARG_INT, &ChildInfo.rows, 0 },        { "col", '\0', POPT_ARG_INT, &ChildInfo.cols, 0 },        {0, 0, 0, 0, 0}    };#if defined(_LITE_VERSION) && !(_STAND_ALONE)    GHANDLE layer;    layer = GetLayerInfo ("vcongui", NULL, NULL, NULL, NULL);    if (layer != INV_LAYER_HANDLE) {        BringLayer2Topmost (layer);        return 0;    }    if (JoinLayer ("vcongui", "vcongui", 0, 0, 1024, 768) == INV_LAYER_HANDLE) {        printf ("JoinLayer: invalid layer handle.\n");        exit (1);    }#endif    optCon = poptGetContext("vcongui", args, arg, options, 0);    if ((rc = poptGetNextOpt (optCon)) < -1) {        fprintf(stderr, "%s: bad argument %s: %s\n", "vm",                poptBadOption (optCon, POPT_BADOPTION_NOALIAS),                poptStrerror (rc));        usage ();        return -1;    }        ChildInfo.execProg = poptGetArg (optCon);    if (ChildInfo.execProg)        ChildInfo.execArgs = poptGetArg (optCon);        poptFreeContext(optCon);#ifndef _LITE_VERSION#ifdef _IME_GB2312    GBIMEWindow (HWND_DESKTOP);#endif#endif    VCOnMiniGUI (&ChildInfo);    return 0;}#ifndef _LITE_VERSION#include <minigui/dti.c>#endif

⌨️ 快捷键说明

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