#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSCdialog.h>
#include <WSCvifield.h>
#include <WSCradioGroup.h>
#include <WSCvlabel.h>
extern WSCdialog* newdial_001;
extern WSCvifield* newvifi_003;
extern WSCradioGroup* newradi_006;
extern WSCvlabel* newvlab_007;
extern WSCvlabel* newvlab_010;
extern WSCvlabel* newvlab_011;

void btnep(WSCbase* object){
  long val = newdial_001->popup();
  if (val == WS_DIALOG_OK){
     newvlab_007->setProperty(WSNlabelString,"DIALOG OK!");
  }else 
  if (val == WS_DIALOG_NO){
     newvlab_007->setProperty(WSNlabelString,"DIALOG NO!");
  }else 
  if (val == WS_DIALOG_CANCEL){
     newvlab_007->setProperty(WSNlabelString,"DIALOG CANCEL!");
  }
  WSCstring tmp;
  tmp = newvifi_003->getProperty(WSNlabelString);
  WSCstring tmp2;
  tmp2 << "INPUT: " << tmp; 
  newvlab_010->setProperty(WSNlabelString,tmp2);

  val = newradi_006->getProperty(WSNvalue);
  tmp2 = "SELECT: ";
  tmp2 << val;
  newvlab_011->setProperty(WSNlabelString,tmp2);

}
static WSCfunctionRegister  op("btnep",(void*)btnep);
