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

📄 dd.c

📁 这是linux下 MiniGUI的一个程序
💻 C
📖 第 1 页 / 共 2 页
字号:
/*** $Id: main.c,v 1.12 2005/05/29 02:17:41 JuncofeniteXu Exp $**** DCU-99Editor, the M$ Windows like Para Editor on MiniGUI.** Copyright (c) 2005, ZYE (710@www.710.com).**** Some idea and source come from VConGUI (Virture Console GUI) **** Create date: ** BTW: today, my sweetheart lovly MinMin comes back from millitery training.*/ /***  This source is not free software; but 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**  have any problem you can send e-mail to: xujunfeng000@sohu.com**  especially, if you want to use this in commerce, you must pay for it**  tel:*//*** Modify records:****  Who             	 When         Where       For What                Status**-----------------------------------------------------------------------------** TODO:*/#include <stdio.h>#include <stdlib.h>#include <string.h> #include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <minigui/control.h>#include "DuplexEditor.h"static int duplex_MainFuncProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam){    switch (message)     {    	case MSG_INITDIALOG:     	   	    	SendDlgItemMessage(hWnd, duplex_KeyTypeSel, CB_ADDSTRING, 0, (LPARAM)"主密钥");    	SendDlgItemMessage(hWnd, duplex_KeyTypeSel, CB_ADDSTRING, 0, (LPARAM)"辅助密钥");      	    	//add limit condition     	  	    	SendDlgItemMessage(hWnd, duplex_MainKey01Edit, EM_LIMITTEXT,4,0);//main key(64/4)    	SendDlgItemMessage(hWnd, duplex_MainKey02Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey03Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey04Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey05Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey06Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey07Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey08Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey09Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey10Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey11Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey12Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey13Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey14Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey15Edit, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_MainKey16Edit, EM_LIMITTEXT,4,0);    	    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit0, EM_LIMITTEXT,4,0);//assistant key(10)    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit1, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit2, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit3, EM_LIMITTEXT,4,0);    	    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit4, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit5, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit6, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit7, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit8, EM_LIMITTEXT,4,0);    	SendDlgItemMessage(hWnd, duplex_AssistantKeyEdit9, EM_LIMITTEXT,4,0);        			        			//initial the interface as main key edit        			SendDlgItemMessage(hWnd, duplex_KeyTypeSel, CB_SETCURSEL, 0, 0);        			SendDlgItemMessage(hWnd, duplex_KeyDistinguishWordEdit, EM_LIMITTEXT, 4, 0);        			SetWindowText(GetDlgItem(hWnd, duplex_KeyDistinguishWord), "鉴别字:");        			        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey01To08), SW_SHOW); // show main key        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey01Edit), SW_SHOW);         			ShowWindow(GetDlgItem(hWnd, duplex_MainKey02Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey03Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey04Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey05Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey06Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey07Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey08Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey09To16), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey09Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey10Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey11Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey12Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey13Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey14Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey15Edit), SW_SHOW);        			ShowWindow(GetDlgItem(hWnd, duplex_MainKey16Edit), SW_SHOW);        			        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey0), SW_HIDE); // hide assistant key        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit0), SW_HIDE);        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey1), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit1), SW_HIDE);        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey2), SW_HIDE);          			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit2), SW_HIDE);        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey3), SW_HIDE);          			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit3), SW_HIDE);        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey4), SW_HIDE);          			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit4), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey5), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit5), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey6), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit6), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey7), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit7), SW_HIDE);        			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey8), SW_HIDE);          			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit8), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKey9), SW_HIDE);         			ShowWindow(GetDlgItem(hWnd, duplex_AssistantKeyEdit9), SW_HIDE);         			        			ShowWindow(GetDlgItem(hWnd, duplex_BackOff), SW_SHOW);        			SetWindowText(GetDlgItem(hWnd, duplex_NextOk), "下一步");        			    	break;    	    	case MSG_COMMAND:        switch(LOWORD(wParam))//some controls must use wParam's party to decide which one ,so must use HIGHWORD(),LOWORD()        {		case	duplex_KeyTypeSel:        	{        			int sel = -1;			//obtain the type			if(HIWORD(wParam) != CBN_SELCHANGE)				break;        		sel = SendDlgItemMessage(hWnd, duplex_KeyTypeSel, CB_GETCURSEL, 0, 0);         		//devision the first edit frame's name(the second static text) and limit length(4,2)        		//mainkey distinguish word:0~0x270f(0~9999), four bits of  0xXXXX; assistant key: 0~99 ,two digital bits        		//show or hide some windows        		if(sel == 0) //main keys        		{        			SendDlgItemMessage(hWnd, duplex_KeyDistinguishWordEdit, EM_LIMITTEXT, 4, 0);        			SetWindowText(GetDlgItem(hWnd, duplex_KeyDistinguishWord), "鉴别字:");        			SetWindowText(GetDlgItem(hWnd, duplex_KeyDistinguishWordEdit), "");        			

⌨️ 快捷键说明

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