WideStudio/MWT Logo
WideStudio/MWT
Programming Guide
WideStudio/MWT 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.90 for WideStudio/MWT ver 3.90, Jul 2005


WideStudio/MWT documents index | Table of contents

Copyright(C) WideStudio/MWT Development Team, 1999-2005 Last modified: Jul 31, 2005