WideStudio/MWT Logo
WideStudio/MWT
Programming Guide
WideStudio/MWT Index
Table of contents


Sample:1 (Hello World)

Here, you create a project,an application window and event procedures. The following is a rudimentary sample which displays "Hello World" by pushing the button of the window,

The source code is ws/samples/C/hello/hello.prj. You can load the project and build by the application builder.



[A view of the application window]

#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//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);



[Executing the application]


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