资源简介
vxWorks下图形界面开发工具Tilcon使用的例子
代码片段和文件信息
/***********************************************************************
** simpletemplate.c
***********************************************************************/
/*----------------------------------------------------------------------
** Define the Main TWD window filename.
**
** To use a filename other than “main.twd“ you can give the name
** of your TWD file on the command line as the first argument or
** change the following line:
*/
#define MAIN_WINDOW_FILE “main.twd“
/*----------------------------------------------------------------------
** Change the following lines if you are going beyond a simple application
**
** Each engine can work with many applications but APPNAME should be unique
** unless the applications cooperate to share the same objects.
**
** Each application can open many channels to other applications and
** engines but each channel‘s USERPROG in the application must be unique.
*/
#define APPNAME “simpletemplate“
#define USERPROG “simpletemplate“
/*----------------------------------------------------------------------
** INCLUDE FILES
*/
#include
#include
#include
#include
#include /* Tilcon API functions */
#if defined (CC_TRT_DOS)
#include
#endif
/*----------------------------------------------------------------------
** define TRT_OS_ENV
**
** NOTE: do not change the order
** CC_TRT_WCE has CC_TRT_DOS defined as well and must follow it
*/
#ifdef CC_TRT_VXWORKS
#define TRT_OS_ENV TRT_VXWORKS
#endif
#ifdef CC_TRT_NTO
#define TRT_OS_ENV TRT_NTO_PHOTON
#endif
#ifdef CC_TRT_DOS
#define TRT_OS_ENV TRT_MS_WINDOWS
#endif
#ifdef CC_TRT_WCE
#define TRT_OS_ENV TRT_WCE
#endif
#ifdef CC_TRT_LINUX
#define TRT_OS_ENV TRT_LNX_X11R6
#endif
/*----------------------------------------------------------------------
** GLOBALS
*/
pid_t TRT_cid; /* Identifies Tilcon Runtime */
TRT_ReceiveData rec_data; /* Record from API */
char *main_window_file = MAIN_WINDOW_FILE; /* twd filename */
char main_window_id[TRT_MAX_ID_LENGTH]; /* window id inside file */
/*----------------------------------------------------------------------
** On Error Exit With Message Box
*/
void ExitBox(char *ErrorMessage)
{
TRT_MessageBox( TRT_cid NULL APPNAME
ErrorMessage NULL “OK“ NULL
TRT_MessageBox_FontHelvetica 14
TRT_MessageBox_Exclamation|TRT_MessageBox_Wait
0 NULL NULL);
TRT_Exit (TRT_cid);
exit(0);
}
/***********************************************************************
************************** Main Entry Point **************************
***********************************************
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 64296 2005-05-30 12:56 StartOut.bmp
文件 29084 2005-05-30 12:56 StopDim.bmp
文件 29084 2005-05-30 12:56 StopIn.bmp
文件 29084 2005-05-30 12:56 StopOut.bmp
文件 14045 2005-05-30 12:56 tiregauge.c
文件 331895 2006-06-27 13:04 tireguage.exe
文件 305244 2006-06-27 12:53 example-messagetext.twd
文件 304769 2006-06-27 12:53 example-pretty.twd
文件 1750 2006-06-27 12:55 Readme.txt
文件 858944 2005-05-30 12:56 MainShell.bmp
文件 8172 2005-05-30 12:56 simpletemplate.c
文件 304770 2006-06-27 12:53 main.twd
文件 384910 2008-04-23 17:28 TilconEvaluationGuide.pdf
文件 1121 2006-06-27 12:53 example-first.twd
文件 1976 2005-05-30 12:56 SliderHandle.bmp
文件 64296 2005-05-30 12:56 StartDim.bmp
文件 64296 2005-05-30 12:56 StartIn.bmp
- 上一篇:广电总局片头会声会影模板
- 下一篇:随机生成大素数
评论
共有 条评论