WideStudio Logo
WideStudio
Programming Guide
WideStudio Index
Table of contents


例1 (Hello World)

首先,创建项目,接着创建应用程序窗口和事件过程。 在如下所示的基本例子中,窗口中的按钮被按下后, 会显示“HelloWorld”字符串。

源代码如下所示: ws/samples/EUCJP/hello/hello.prj; ws/samples/SJIS/hello/hello.prj。 使用应用程序生成器打开文件,并进行编译。



[应用程序窗口示例]

#include 
#include 
#include 
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
void btn_proc(WSCbase* object){
  //do something...
  static long cnt = 0;
  if (cnt == 0){
    object->setProperty(WSNlabelString,"Hello World.");
    cnt++;
  }else{
    exit(0);
  }
}
static WSCfunctionRegister  op("btn_proc",(void*)btn_proc);



[应用程序运行示例]


Document Release 3.70 for WideStudio ver 3.70, Feb 2004


WideStudio documents index | Table of contents

Copyright(C) T. Hirabayashi, 2000-2004 Last modified: Feb 25, 2004