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 <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);



[응용프로그램 실행의 모습]


Document Release 3.70 for WideStudio ver 3.70, May 2004


WideStudio documents index | Table of contents

Copyright(C) WideStudio Development Team, 1999-2004 Last modified: May 25, 2004