cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Use ProUIDalogExit to close the dialog box, but it does not work.

SP_10210577
11-Garnet

Use ProUIDalogExit to close the dialog box, but it does not work.

Hello, I would like to ask you a question about using the creatolkit dialog box.

You are using the dialog box by creating a dialog with ProUIDialogCreate and enabling it with ProUIDialogActivate.

The feature I created was considered to open the dialog box periodically, so I don't want to use ProUIDialogDestroy and I want to close the dialog only with ProUIDialogExit.

However, there is a problem that the dialog box does not close when using ProUIDalogExit.

The code says PRO_TK_NO_ERROR is returned and error-free. Code progression is also running correctly out of ProUIDialogActivate, but the dialog does not close on the screen.

If you know anything about this situation, I would appreciate your help.

Below is a partial reference code attached.

Thank you.

 

 

 

// Functions to run when the Cancel button is pressed
void OnCancelButtonClicked(char* dialog, char* component, ProAppData data)
{
	ProError status = PRO_TK_NO_ERROR;

	if (list_nameset != NULL)
		ProArrayFree((ProArray*)&list_nameset);
	if (list_labelset != NULL)
		ProArrayFree((ProArray*)&list_labelset);
	if (file_display_mdl != NULL)
		ProArrayFree((ProArray*)&file_display_mdl);
	if (selcections_wlist != NULL)
		ProArrayFree((ProArray*)&selcections_wlist);
	if (selcections_clist != NULL)
		ProArrayFree((ProArray*)&selcections_clist);
	if (out_promdl != NULL)
		ProArrayFree((ProArray*)&out_promdl);


	//Close the dialog
	status = ProUIDialogExit(dialog, PRO_TK_NO_ERROR);
	if (status != PRO_TK_NO_ERROR) {
		printf("대화 상자 닫기 오류: %d\n", status);
		return;
	}
}

ProError MyCustomActionCallback(uiCmdCmdId cmd_id, ProAppData data)
{
status = ProArrayAlloc(0, sizeof(wchar_t**), 1, (ProArray*)&selcections_wlist);
	status = ProArrayAlloc(0, sizeof(char**), 1, (ProArray*)&selcections_clist);
	status = ProArrayAlloc(0, sizeof(ProMdl), 1, (ProArray*)&out_promdl);

	if (status != PRO_TK_NO_ERROR) {
		iMessageBox(L"ProMdl 함수에서 오류 발생.");
	}

	//UI 활성화
	status = ProUIDialogActivate(DIALOG_NAME2, NULL);
	if (status != PRO_TK_NO_ERROR)
	{
		iMessageBox(L"Acticate_ERROR");
	}

	status = ProUIDialogExit(DIALOG_NAME2, PRO_TK_NO_ERROR);
	if (status != PRO_TK_NO_ERROR) {
		printf("대화 상자 닫기 오류: %d\n", status);
	
	}
	
	return PRO_TK_NO_ERROR;
}



//---------------------------------------------------------------------
//FUNCTION : user_initialize()
//---------------------------------------------------------------------
extern "C" int user_initialize(
	int argc,
	char* argv[],
	char* version,
	char* build,
	wchar_t errbuf[80])
{

	ProError status = PRO_TK_NO_ERROR;
	uiCmdCmdId custom_action_id;
	ProFileName msgfile;

	UIsetting();
	
	status = ProCmdActionAdd("MyCustomActionCallback", (uiCmdCmdActFn)MyCustomActionCallback, uiProe2ndImmediate, NULL, PRO_B_TRUE, PRO_B_TRUE, &custom_action_id);
	status = ProCmdIconSet(custom_action_id, "3P_1.png");
	status = ProCmdDesignate(custom_action_id, "DRAWING", "run_help", "run_help", msgfile);


	return 0;		
}

 

 

 

0 REPLIES 0
Top Tags