请问xtang先生,关闭dialog和window用代码怎么关闭?

我只找到了一种方法,在IDE里面用关联到DONE上,那么用代码怎么做呢?

1.PtDestroyWidget( ABW_Window0 );关闭指定窗口。

如果代码生成的窗口,运行时才知道,点击那个窗口中的Button就关闭那个,可以写成

int
exit_f( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )
{
	PtDestroyWidget( widget->parent );
	
	/* eliminate 'unreferenced' warnings */
	widget = widget, apinfo = apinfo, cbinfo = cbinfo;

	return( Pt_CONTINUE );
}

2.PtExit( EXIT_SUCCESS );