#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSCmessageDialog.h>
#include <WSCvlabel.h>

extern WSCmessageDialog* newmess_002;
extern WSCvlabel* newvlab_001;

void btn1_ep(WSCbase* object){
  //do something...
  //popup the dialog.
  long ret_val = newmess_002->popup();
  if (ret_val == WS_DIALOG_OK){
    //return OK (when the [OK] button pressed.)
    newvlab_001->setProperty(WSNlabelString,"Dialog: OK!");
  }else if (ret_val == WS_DIALOG_CANCEL){
    //return OK (when the [Cancel] button pressed.)
    newvlab_001->setProperty(WSNlabelString,"Dialog: CANCEL!");
  }
}
static WSCfunctionRegister  op("btn1_ep",(void*)btn1_ep);
