?? control.h
字號:
/* control.h * * This file include definitions of control module. * * MiniGUI for Linux Version 0.3.xx * Copyright (c) 1994 ~ 2000 Wei Yongming. * Last modified date: 2000/06/18 *//*** This library is free software; you can redistribute it and/or** modify it under the terms of the GNU Library General Public** License as published by the Free Software Foundation; either** version 2 of the License, or (at your option) any later version.**** This library 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** Library General Public License for more details.**** You should have received a copy of the GNU Library 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*/#ifndef GUI_CONTROL_H #define GUI_CONTROL_H #ifdef __cplusplusextern "C" {#endif /* __cplusplus *//************************** Control Helpers **********************************/void GUIAPI Draw3DControlFrame (HDC hdc, int x0, int y0, int x1, int y1, int fillc, BOOL updown);int GUIAPI NotifyParent (HWND hwnd, int id, int code);/****** control messages *****************************************************/// NOTE: Control messages start from 0xF000 to 0xFFFF#define MSG_FIRSTCTRLMSG 0xF000#define MSG_LASTCTRLMSG 0xFFFF/****** Static Control ******************************************************/#ifdef _CTRL_STATIC#define CTRL_STATIC ("static")/* Static Control Styles */#define SS_LEFT 0x00000000L#define SS_CENTER 0x00000001L#define SS_RIGHT 0x00000002L#define SS_ICON 0x00000003L#define SS_BLACKRECT 0x00000004L#define SS_GRAYRECT 0x00000005L#define SS_WHITERECT 0x00000006L#define SS_BLACKFRAME 0x00000007L#define SS_GRAYFRAME 0x00000008L#define SS_WHITEFRAME 0x00000009L#define SS_GROUPBOX 0x0000000AL#define SS_SIMPLE 0x0000000BL#define SS_LEFTNOWORDWRAP 0x0000000CL#define SS_OWNERDRAW 0x0000000DL#define SS_BITMAP 0x0000000EL#define SS_ENHMETAFILE 0x0000000FL#define SS_TYPEMASK 0x0000000FL#define SS_NOPREFIX 0x00000080L#define SS_ETCHEDHORZ 0x00000010L#define SS_ETCHEDVERT 0x00000011L#define SS_ETCHEDFRAME 0x00000012L#define SS_ETCTYPEMAKS 0x0000001FL#define SS_NOTIFY 0x00000100L#define SS_CENTERIMAGE 0x00000200L#define SS_RIGHTJUST 0x00000400L#define SS_REALSIZEIMAGE 0x00000800L/* not supported styles */// #define SS_SUNKEN 0x00001000L// #define SS_ENDELLIPSIS 0x00004000L// #define SS_PATHELLIPSIS 0x00008000L// #define SS_WORDELLIPSIS 0x0000C000L// #define SS_ELLIPSISMASK 0x0000C000L// Static Control messages#define STM_SETICON 0xF170#define STM_GETICON 0xF171#define STM_SETIMAGE 0xF172#define STM_GETIMAGE 0xF173#define STM_MSGMAX 0xF174// Static Control notification code#define STN_DBLCLK 1#define STN_ENABLE 2#define STN_DISABLE 3#define STN_CLICKED 4#endif /* _CTRL_STATIC *//****** Button Control ******************************************************/#ifdef _CTRL_BUTTON#define CTRL_BUTTON ("button")/* Button Styles */#define BS_PUSHBUTTON 0x00000000L#define BS_DEFPUSHBUTTON 0x00000001L#define BS_CHECKBOX 0x00000002L#define BS_AUTOCHECKBOX 0x00000003L#define BS_RADIOBUTTON 0x00000004L#define BS_3STATE 0x00000005L#define BS_AUTO3STATE 0x00000006L#define BS_GROUPBOX 0x00000007L#define BS_USERBUTTON 0x00000008L#define BS_AUTORADIOBUTTON 0x00000009L#define BS_OWNERDRAW 0x0000000BL#define BS_TYPEMASK 0x0000000FL#define BS_TEXT 0x00000000L#define BS_LEFTTEXT 0x00000020L#define BS_ICON 0x00000040L#define BS_BITMAP 0x00000080L#define BS_CONTENTMASK 0x000000F0L#define BS_LEFT 0x00000100L#define BS_RIGHT 0x00000200L#define BS_CENTER 0x00000300L#define BS_TOP 0x00000400L#define BS_BOTTOM 0x00000800L#define BS_VCENTER 0x00000C00L#define BS_ALIGNMASK 0x00000F00L#define BS_PUSHLIKE 0x00001000L#define BS_MULTLINE 0x00002000L#define BS_NOTIFY 0x00004000L#define BS_FLAT 0x00008000L#define BS_RIGHTBUTTON BS_LEFTTEXT#define BST_UNCHECKED 0x0000#define BST_CHECKED 0x0001#define BST_INDETERMINATE 0x0002#define BST_PUSHED 0x0004#define BST_FOCUS 0x0008// Button Control messages#define BM_GETCHECK 0xF0F0#define BM_SETCHECK 0xF0F1#define BM_GETSTATE 0xF0F2#define BM_SETSTATE 0xF0F3#define BM_SETSTYLE 0xF0F4#define BM_CLICK 0xF0F5#define BM_GETIMAGE 0xF0F6#define BM_SETIMAGE 0xF0F7 #define BM_IMAGE_BITMAP 1 #define BM_IMAGE_ICON 2/* User Button notification codes */#define BN_CLICKED 0#define BN_PAINT 1#define BN_HILITE 2#define BN_UNHILITE 3#define BN_DISABLE 4#define BN_DOUBLECLICKED 5#define BN_PUSHED BN_HILITE#define BN_UNPUSHED BN_UNHILITE#define BN_DBLCLK BN_DOUBLECLICKED#define BN_SETFOCUS 6#define BN_KILLFOCUS 7#endif /* _CTRL_BUTTON *//****** Edit and MEdit Control ***********************************************/#if defined(_CTRL_EDIT) || defined(_CTRL_MEDIT)#define CTRL_SLEDIT ("sledit")#define CTRL_EDIT ("edit")#define CTRL_MLEDIT ("mledit")#define CTRL_MEDIT ("medit")/* Edit control styles */#define ES_LEFT 0x00000000L#define ES_CENTER 0x00000001L#define ES_RIGHT 0x00000002L#define ES_MULTILINE 0x00000004L#define ES_UPPERCASE 0x00000008L#define ES_LOWERCASE 0x00000010L#define ES_PASSWORD 0x00000020L#define ES_AUTOVSCROLL 0x00000040L#define ES_AUTOHSCROLL 0x00000080L#define ES_NOHIDESEL 0x00000100L#define ES_OEMCONVERT 0x00000400L#define ES_READONLY 0x00000800L// Edit Control messages#define EM_GETSEL 0xF0B0#define EM_SETSEL 0xF0B1#define EM_GETRECT 0xF0B2#define EM_SETRECT 0xF0B3#define EM_SETRECTNP 0xF0B4#define EM_SCROLL 0xF0B5#define EM_LINESCROLL 0xF0B6#define EM_SCROLLCARET 0xF0B7#define EM_GETMODIFY 0xF0B8#define EM_SETMODIFY 0xF0B9#define EM_GETLINECOUNT 0xF0BA#define EM_LINEINDEX 0xF0BB#define EM_SETHANDLE 0xF0BC#define EM_GETHANDLE 0xF0BD#define EM_GETTHUMB 0xF0BE#define EM_LINELENGTH 0xF0C1#define EM_REPLACESEL 0xF0C2#define EM_GETLINE 0xF0C4#define EM_LIMITTEXT 0xF0C5#define EM_CANUNDO 0xF0C6#define EM_UNDO 0xF0C7#define EM_FMTLINES 0xF0C8#define EM_LINEFROMCHAR 0xF0C9#define EM_SETTABSTOPS 0xF0CB#define EM_SETPASSWORDCHAR 0xF0CC#define EM_EMPTYUNDOBUFFER 0xF0CD#define EM_GETFIRSTVISIBLELINE 0xF0CE#define EM_SETREADONLY 0xF0CF#define EM_SETWORDBREAKPROC 0xF0D0#define EM_GETWORDBREAKPROC 0xF0D1#define EM_GETPASSWORDCHAR 0xF0D2#define EM_SETMARGINS 0xF0D3#define EM_GETMARGINS 0xF0D4#define EM_SETLIMITTEXT EM_LIMITTEXT#define EM_GETLIMITTEXT 0xF0D5#define EM_POSFROMCHAR 0xF0D6#define EM_CHARFROMPOS 0xF0D7#define EM_SETIMESTATUS 0xF0D8#define EM_GETIMESTATUS 0xF0D9/* Edit control notification codes */#define EN_CLICKED 0x0001#define EN_DBLCLK 0x0002#define EN_SETFOCUS 0x0100#define EN_KILLFOCUS 0x0200#define EN_CHANGE 0x0300#define EN_UPDATE 0x0400#define EN_ERRSPACE 0x0500#define EN_MAXTEXT 0x0501#define EN_HSCROLL 0x0601#define EN_VSCROLL 0x0602#define EN_ENTER 0x0700/* Edit control EM_SETMARGIN parameters */#define EC_LEFTMARGIN 0x0001#define EC_RIGHTMARGIN 0x0002#define EC_USEFONTINFO 0xffff/* wParam of EM_GET/SETIMESTATUS */#define EMSIS_COMPOSITIONSTRING 0x0001/* lParam for EMSIS_COMPOSITIONSTRING */#define EIMES_GETCOMPSTRATONCE 0x0001#define EIMES_CANCELCOMPSTRINFOCUS 0x0002#define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004#endif /* _CTRL_EDIT || _CTRL_MEDIT *//****** Progress Bar Control *************************************************/#ifdef _CTRL_PROGRESSBAR#define CTRL_PROGBAR ("progressbar")/* Progress Bar styles */#define PBS_NOTIFY 0x0001L#define PBS_VERTICAL 0x0002L// Progress Bar messages#define PBM_SETRANGE 0xF0A0#define PBM_SETSTEP 0xF0A1
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -