|
Proe4.0二次开发的UI对话框二次开发注册到proe的时候,对话框只能打开一次,第二次就打不开了。求高手帮助……
代码如下
#include"stdafx.h"
#include "roUIDialog.h"
#include "roUIPushbutton.h"
#define OK 1
#define CANCEL 0
void OKAction(
char*dialog,
char*component,
ProAppData data)
{
int status;
status=ProUIDialogExit(dialog,OK);
}
void CancelAction(char*dialog,
char*component,
ProAppData data)
{
int status;
status=ProUIDialogExit(dialog,CANCEL);
}
int FirstDialog()
{
int status;
char*dialog_name="FirstDialog";
int error;
status=ProUIDialogCreate("name",dialog_name);
status=ProUIPushbuttonActivateActionSet("name","OK",OKAction,NULL);
status=ProUIPushbuttonActivateActionSet("name","Cancel",CancelAction,NULL);
status=ProUIDialogActivate("name",&error);
status=ProUIDialogDestroy("name");
return status;
} |
|