📄 uilabel.h
字号:
/*********************************************************************/
// 文 件 名: uiLabel.h
// 程序说明: Label控件
// 程序设计: 产革宏
// 2001.10.19 设计完成 说明文档:R004-S201-0001
// 程序审查: 宋军霞
// 2002.01.22 审查完成 说明文档:R004-S201-0001
// 项目编号: R004-S201
// 版 本: V1.0
// 版 权: Reality Plus Technology (ShenZhen) Co.,Ltd.
/*********************************************************************/
#ifndef _GUI_LABEL_H_
#define _GUI_LABEL_H_
#include <uiControl.h>
#define _DEBUG_LABEL 0
/**************************************************************
CONSTANT
**************************************************************/
// 风格定义
#define LABEL_BORDER_NONE 0x0000 //边框
#define LABEL_BORDER_SOLID 0x0001
#define LABEL_BORDER_HATCH 0x0002
#define LABEL_ALIGN_LEFT 0x0000 //对齐方式
#define LABEL_ALIGN_CENTER 0x0004
#define LABEL_ALIGN_RIGHT 0x0008
// max char length of caption
#define GUI_LABEL_CAPTION_SIZE 63
/**************************************************************
DATA STRUCTURE
**************************************************************/
typedef struct tagGuiLabel //96 40+4+32+16
{
TGuiControl base ; //40
/* extention attribute */
short backColor, fontColor ;
char caption[GUI_LABEL_CAPTION_SIZE+1] ; // +1 for null
}TGuiLabel;
/**************************************************************
PUBLIC FUNCTION DECLARATION
**************************************************************/
/*==================================================================================
Function Name : guiLabel_Create
Purpose : Create a new label
Parameter(s) : left,top is left-top point
right,bottom is right-bottom point
caption is string ended by null for display
style is label display style,Exp. LABEL_BORDER_SOLID | LABEL_ALIGN_CENTER
color is background color,can set foreground color also by
Return Value : >0 the handle of the new LABEL ,=0 failure
==================================================================================*/
DLL_EXP(HNDL) guiLabel_Create( WORD left, WORD top,WORD right, WORD bottom,const char* caption, WORD style);
/*==================================================================================
Function Name : guiLabel_SetText
Purpose : change caption for label
Parameter(s) : handle is the label ID you want to change
Return Value : STATUS_ERR / STATUS_OK
==================================================================================*/
DLL_EXP(STATUS) guiLabel_SetCaption ( HNDL handle,const char *caption );
/*==================================================================================
Function Name : guiLabel_GetText
Purpose : Get the caption of the label
Parameter(s) : handle is the label ID
Return Value : >0 is ok ,<=0(0 or STATUS_ERR)is failure
==================================================================================*/
DLL_EXP(char*) guiLabel_GetCaption( HNDL handle );
#endif //_GUI_LABEL_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -