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

📄 guicontrol.h

📁 The combined demo is dedicated for S1C33L05, so DMT33L05 should be used to load and run the demo. F
💻 H
📖 第 1 页 / 共 2 页
字号:
/* $Id: guiControl.h V1.0 2001/09/20 */
/*****************************************************************
 *    This source code has been made available to you by EPSON on an AS-IS
 *    basis.  Anyone receiving this source is licensed under EPSON
 *    copyrights to use it in any way he or she deems fit, including
 *    copying it, modifying it, compiling it, and redistributing it either
 *    with or without modifications.
 *
 *    Any person who transfers this source code or any derivative work
 *    must include the EPSON copyright notice, this paragraph, and the
 *    preceding two paragraphs in the transferred software.
 *
 *    COPYRIGHT   EPSON  CORPORATION 2001
 *    LICENSED MATERIAL  -  PROGRAM PROPERTY OF EPSON
 ***********************************************************************/


/******************************************************************
  * FILE: guiControl.h
  * MODULE:  CONTROL
  *
  *  PURPOSE: declaration of the macro-definition and function  for Control
  *
  *
  * AUTHOR(S): Liyq
  * GROUP: GUI Group
  * DATE CREATED: 2001/09/20
  * REFERENCE DOCUMENT ID:
  * MODIFICATIONS:
  *    Date           userName     Description
  *    2001/09/26     Liyq        Create this file
  *    2001/12/10     PengWen  Add TreeView structure id field and MSG_TV_IDFINDING
  *                                          message.
  *******************************************************************/


#ifndef _GUICONTROL_H
#define _GUICONTROL_H

#ifdef __cplusplus
extern "C" {
#endif  /* __cplusplus */

/************************** Control Helpers **********************************/
T_VOID fnGUI_Draw3DControlFrame (T_GUI_HDC hdc,
							     T_WORD x0,
								 T_WORD y0,
								 T_WORD x1,
								 T_WORD y1,
								 T_WORD fillc,
								 T_BOOL updown);

T_VOID fnGUI_DrawFlatControlFrameEx (T_GUI_HDC hdc,
									 T_WORD x0,
									 T_WORD y0,
									 T_WORD x1,
									 T_WORD y1,
									 T_WORD fillc,
									 T_WORD corner,
									 T_WORD updown);

#define fnGUI_DrawFlatControlFrame(hdc, x0, y0, x1, y1, fillc, updown) \
                 fnGUI_DrawFlatControlFrameEx(hdc, x0, y0, x1, y1, fillc, 3, updown);

#define fnGUI_NotifyParent(hwnd, id, code)  \
			fnGUI_SendNotifyMessage (fnGUI_GetParent(hwnd),\
									 MSG_COMMAND,\
									(T_GUI_WPARAM)MAKELONG (id, code),\
									(T_GUI_LPARAM)hwnd);

/****** 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 STY_STATIC_LEFT							0x00000000L
#define STY_STATIC_CENTER						0x00000001L
#define STY_STATIC_RIGHT						0x00000002L
#define STY_STATIC_ICON							0x00000003L
#define STY_STATIC_BLACKRECT					0x00000004L
#define STY_STATIC_GRAYRECT						0x00000005L
#define STY_STATIC_WHITERECT					0x00000006L
#define STY_STATIC_BLACKFRAME					0x00000007L
#define STY_STATIC_GRAYFRAME					0x00000008L
#define STY_STATIC_WHITEFRAME					0x00000009L
#define STY_STATIC_GROUPBOX						0x0000000AL
#define STY_STATIC_SIMPLE						0x0000000BL
#define STY_STATIC_LEFTNOWORDWRAP				0x0000000CL
#define STY_STATIC_OWNERDRAW					0x0000000DL
#define STY_STATIC_BITMAP						0x0000000EL
#define STY_STATIC_ENHMETAFILE					0x0000000FL
#define STY_STATIC_TYPEMASK						0x0000000FL


#define STY_STATIC_NOPREFIX         			0x00000080L

#define STY_STATIC_ETCHEDHORZ			0x00000010L
#define STY_STATIC_ETCHEDVERT			0x00000011L
#define STY_STATIC_ETCHEDFRAME			0x00000012L
#define STY_STATIC_ETCTYPEMAKS			0x0000001FL

#define STY_STATIC_NOTIFY				0x00000100L
#define STY_STATIC_CENTERIMAGE			0x00000200L
#define STY_STATIC_RIGHTJUST		    0x00000400L
#define STY_STATIC_REALSIZEIMAGE		0x00000800L

/* Static Control messages */
#define MSG_STATIC_SETICON					0xF170
#define MSG_STATIC_GETICON					0xF171
#define MSG_STATIC_SETIMAGE			   		0xF172
#define MSG_STATIC_GETIMAGE					0xF173

#define MSG_STATIC_MSGMAX					0xF175

/* Static Control notification code */
#define SIG_STATIC_DBLCLK					1
#define SIG_STATIC_ENABLE					2
#define SIG_STATIC_DISABLE				3
#define SIG_STATIC_CLICKED				4
#define SIG_STATIC_SETFOCUS				5	/*added by ChenHong 2003.1.8*/
#define SIG_STATIC_KILLFOCUS			6	/*added by ChenHong 2003.1.8*/


/* Static Control return values */
#define STATIC_OKAY                  0
#define STATIC_ERR                  (-1)
#define STATIC_ERRSPACE         	(-2)

#endif /* _CTRL_STATIC */

/****** Button Control ******************************************************/
#ifdef _CTRL_BUTTON

#define CTRL_BUTTON         ("button")

/* Button Styles */
#define STY_BTN_PUSHBUTTON				0x00000000L
#define STY_BTN_DEFPUSHBUTTON			0x00000001L
#define STY_BTN_CHECKBOX				0x00000002L
#define STY_BTN_AUTOCHECKBOX			0x00000003L
#define STY_BTN_RADIOBUTTON				0x00000004L
#define STY_BTN_3STATE					0x00000005L
#define STY_BTN_AUTO3STATE				0x00000006L
#define STY_BTN_GROUPBOX				0x00000007L
#define STY_BTN_USERBUTTON				0x00000008L
#define STY_BTN_AUTORADIOBUTTON			0x00000009L
#define STY_BTN_OWNERDRAW				0x0000000BL
#define STY_BTN_TYPEMASK				0x0000000FL

#define STY_BTN_TEXT					0x00000000L
#define STY_BTN_LEFTTEXT				0x00000020L
#define STY_BTN_ICON					0x00000040L
#define STY_BTN_BITMAP					0x00000080L
#define STY_BTN_ICONWITHSTRING             0x00000090L
#define STY_BTN_CONTENTMASK				0x000000F0L

#define STY_BTN_LEFT					0x00000100L
#define STY_BTN_RIGHT					0x00000200L
#define STY_BTN_CENTER					0x00000300L
#define STY_BTN_TOP						0x00000400L
#define STY_BTN_BOTTOM					0x00000800L
#define STY_BTN_VCENTER					0x00000C00L
#define STY_BTN_ALIGNMASK				0x00000F00L

#define STY_BTN_PUSHLIKE				0x00001000L
#define STY_BTN_MULTLINE				0x00002000L
#define STY_BTN_NOTIFY					0x00004000L
#define STY_BTN_FLAT					0x00008000L
#define STY_BTN_RIGHTBUTTON			STY_BTN_LEFTTEXT

#define STA_BTN_UNCHECKED			0x0000
#define STA_BTN_CHECKED				0x0001
#define STA_BTN_INDETERMINATE		0x0002
#define STA_BTN_PUSHED				0x0004
#define STA_BTN_FOCUS				0x0008

/* Button Control messages */
#define MSG_BTN_GETCHECK					0xF0F0
#define MSG_BTN_SETCHECK					0xF0F1
#define MSG_BTN_GETSTATE					0xF0F2
#define MSG_BTN_SETSTATE					0xF0F3
#define MSG_BTN_SETSTYLE					0xF0F4
#define MSG_BTN_CLICK						0xF0F5
#define MSG_BTN_GETIMAGE					0xF0F6
#define MSG_BTN_SETIMAGE					0xF0F7
    #define MSG_BTN_IMAGE_BITMAP			1
    #define MSG_BTN_IMAGE_ICON				2

/* User Button notification codes */
#define SIG_BTN_CLICKED							0
#define SIG_BTN_PAINT							1
#define SIG_BTN_HILITE							2
#define SIG_BTN_UNHILITE						3
#define SIG_BTN_DISABLE							4
#define SIG_BTN_DOUBLECLICKED					5
#define SIG_BTN_PUSHED					SIG_BTN_HILITE
#define SIG_BTN_UNPUSHED				SIG_BTN_UNHILITE
#define SIG_BTN_DBLCLK					SIG_BTN_DOUBLECLICKED
#define SIG_BTN_SETFOCUS						6
#define SIG_BTN_KILLFOCUS						7

#define BTN_OKAY                 0
#define BTN_ERR                 (-1)
#define BTN_ERRSPACE         	(-2)

#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 STY_EDIT_LEFT						0x00000000L
#define STY_EDIT_CENTER						0x00000001L
#define STY_EDIT_RIGHT						0x00000002L
#define STY_EDIT_MULTILINE					0x00000004L
#define STY_EDIT_UPPERCASE					0x00000008L
#define STY_EDIT_LOWERCASE					0x00000010L
#define STY_EDIT_PASSWORD					0x00000020L
#define STY_EDIT_AUTOVSCROLL				0x00000040L
#define STY_EDIT_AUTOHSCROLL				0x00000080L
#define STY_EDIT_NOHIDESEL					0x00000100L
#define STY_EDIT_OEMCONVERT					0x00000400L
#define STY_EDIT_READONLY					0x00000800L
#define STY_EDIT_BASELINE					0x00001000L
#define STY_EDIT_AUTOWRAP					0x00002000L

/* Edit Control messages */
#define MSG_EDIT_GETSEL               0xF0B0
#define MSG_EDIT_SETSEL               0xF0B1
#define MSG_EDIT_GETRECT              0xF0B2
#define MSG_EDIT_SETRECT              0xF0B3
#define MSG_EDIT_SETRECTNP            0xF0B4
#define MSG_EDIT_SCROLL               0xF0B5
#define MSG_EDIT_LINESCROLL           0xF0B6
#define MSG_EDIT_SCROLLCARET          0xF0B7
#define MSG_EDIT_GETMODIFY            0xF0B8
#define MSG_EDIT_SETMODIFY            0xF0B9
#define MSG_EDIT_GETLINECOUNT         0xF0BA
#define MSG_EDIT_LINEINDEX            0xF0BB
#define MSG_EDIT_SETHANDLE            0xF0BC
#define MSG_EDIT_GETHANDLE            0xF0BD
#define MSG_EDIT_GETTHUMB             0xF0BE
#define MSG_EDIT_LINELENGTH           0xF0C1
#define MSG_EDIT_REPLACESEL           0xF0C2
#define MSG_EDIT_GETLINE              0xF0C4
#define MSG_EDIT_LIMITTEXT            0xF0C5
#define MSG_EDIT_CANUNDO              0xF0C6
#define MSG_EDIT_UNDO                 0xF0C7
#define MSG_EDIT_FMTLINES             0xF0C8
#define MSG_EDIT_LINEFROMCHAR         0xF0C9
#define MSG_EDIT_SETTABSTOPS          0xF0CB
#define MSG_EDIT_SETPASSWORDCHAR      0xF0CC
#define MSG_EDIT_EMPTYUNDOBUFFER      0xF0CD
#define MSG_EDIT_GETFIRSTVISIBLELINE  0xF0CE
#define MSG_EDIT_SETREADONLY          0xF0CF
#define MSG_EDIT_SETWORDBREAKPROC     0xF0D0
#define MSG_EDIT_GETWORDBREAKPROC     0xF0D1
#define MSG_EDIT_GETPASSWORDCHAR      0xF0D2
#define MSG_EDIT_SETMARGINS           0xF0D3
#define MSG_EDIT_GETMARGINS           0xF0D4
#define MSG_EDIT_SETLIMITTEXT         MSG_EDIT_LIMITTEXT
#define MSG_EDIT_GETLIMITTEXT         0xF0D5
#define MSG_EDIT_POSFROMCHAR          0xF0D6
#define MSG_EDIT_CHARFROMPOS          0xF0D7
#define MSG_EDIT_SETIMESTATUS         0xF0D8
#define MSG_EDIT_GETIMESTATUS         0xF0D9

#define MSG_MEDIT_SCROLLCHANGE	0xF0DB


/* Edit control notification codes */
#define SIG_EDIT_CLICKED          0x0001
#define SIG_EDIT_DBLCLK           0x0002
#define SIG_EDIT_SETFOCUS         0x0100
#define SIG_EDIT_KILLFOCUS        0x0200
#define SIG_EDIT_CHANGE           0x0300
#define SIG_EDIT_UPDATE           0x0400
#define SIG_EDIT_ERRSPACE         0x0500
#define SIG_EDIT_MAXTEXT          0x0501
#define SIG_EDIT_HSCROLL          0x0601
#define SIG_EDIT_VSCROLL          0x0602
#define SIG_EDIT_ENTER            0x0700

#endif /* _CTRL_EDIT || _CTRL_MEDIT */

/****** Progress Bar Control *************************************************/
#ifdef _CTRL_PROGRESSBAR

#define CTRL_PROGBAR        ("progressbar")

/* Progress Bar styles */
#define STY_PB_NOTIFY              0x0001L
#define STY_PB_VERTICAL            0x0002L

/* Progress Bar messages */
#define MSG_PB_SETRANGE            0xF0A0
#define MSG_PB_SETSTEP             0xF0A1
#define MSG_PB_SETPOS              0xF0A2
#define MSG_PB_DELTAPOS            0xF0A3
#define MSG_PB_STEPIT              0xF0A4

/* Progress Bar notification code */
#define SIG_PB_REACHMAX            1
#define SIG_PB_REACHMIN            2

#define PB_OKAY                  0
#define PB_ERR                  (-1)
#define PB_ERRSPACE         	(-2)

⌨️ 快捷键说明

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