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

void btnop(WSCbase* object){
  static long cnt = 0;
  WSCuchar buffer[64];
  sprintf((char*)buffer,"udp data: cnt=%d",cnt);
  cnt++;
  long ret = newvudp_000->write(buffer,64);
  if (ret < 64){
    WSGIappMessageDialog()->setProperty(WSNwidth,500);
    WSGIappMessageDialog()->setProperty(WSNlabelString,"udp data send failed..");
    WSGIappMessageDialog()->popup();
    return;
  }else{
    newvlab_005->setProperty(WSNlabelString,(char*)buffer);
  }
}
static WSCfunctionRegister  op("btnop",(void*)btnop);
