matlab mcl,Enable deployed applications to process graphics events, enabling figure windows to remai...

mclWaitForFiguresToDie

Enable deployed applications to process graphics events,

enabling figure windows to remain displayed

Synopsis

void mclWaitForFiguresToDie(HMCRINSTANCE instReserved)

Description

Calling void mclWaitForFiguresToDie enables

the deployed application to process graphics events.

NULL is the only parameter accepted for the MATLAB® Runtime instance

(HMCRINSTANCE instReserved).

This function can only be called after libraryInitialize has

been called and before libraryTerminate has

been called.

mclWaitForFiguresToDie blocks all open figures. This function runs until no

visible figures remain. At that point, it displays a warning if there are invisible

figures present. This function returns only when the last figure window is manually

closed — therefore, this function should be called after the library runs at

least one figure window. This function may be called multiple times.

If this function is not called, any figure windows initially

displayed by the application briefly appear, and then the application

exits.

Note

mclWaitForFiguresToDie blocks the calling program only for

MATLAB figures. It does not block any Java® GUIs, ActiveX® controls, and other non-MATLAB GUIs unless they are embedded in a MATLAB figure window.

Examples

int run_main(int argc, const char** argv)

{

int some_variable = 0;

if (argc > 1)

test_to_run = atoi(argv[1]);

/* Initialize application */

if( !mclInitializeApplication(NULL,0) )

{

fprintf(stderr,

"An error occurred while

initializing: \n %s ",

mclGetLastErrorMessage());

return -1;

}

if (test_to_run == 1 || test_to_run == 0)

{

/* Initialize ax1ks library */

if (!libax1ksInitialize())

{

fprintf(stderr,

"An error occurred while

initializing: \n %s ",

mclGetLastErrorMessage());

return -1;

}

}

if (test_to_run == 2 || test_to_run == 0)

{

/* Initialize simple library */

if (!libsimpleInitialize())

{

fprintf(stderr,

"An error occurred while

initializing: \n %s ",

mclGetLastErrorMessage());

return -1;

}

}

/* your code here

/* your code here

/* your code here

/* your code here

/*

/* Block on open figures */

mclWaitForFiguresToDie(NULL);

/* Terminate libraries */

if (test_to_run == 1 || test_to_run == 0)

libax1ksTerminate();

if (test_to_run == 2 || test_to_run == 0)

libsimpleTerminate();

/* Terminate application */

mclTerminateApplication();

return(0);

}

Introduced in R2009a

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值