📄 busybar.cpp
字号:
/*----------------------------------------------------------------------+
| |
| busy.mc |
| |
| ------------------------------------------------- |
| Example of the busybar. |
+----------------------------------------------------------------------*/
#include <mdl.h>
#include <mdlio.h>
#include <dlogbox.h>
#include <dlogids.h>
#include <dlogitem.h>
#include <dlogman.fdf>
#include <string.h>
#if defined (MSVERSION) && (MSVERSION >= 0x550)
#include <msoutput.fdf>
#include <msmisc.fdf>
#endif
/*----------------------------------------------------------------------+
|
| Private global variables
|
+----------------------------------------------------------------------*/
Private int progress=0;
/*-------------------------------------------------------+
| |
| proLoop |
| |
+-------------------------------------------------------*/
Private int proLoop
(
)
{int i=0;
float x=0;
switch ( progress )
{
case 0 :
{
++progress;
for (x=0;x < 300; ++x);
/*-----------------------------------------------+
| |
| build code in here |
| |
+-----------------------------------------------*/
return SUCCESS;
break;
}
case 100 :
{
return !SUCCESS;
break;
}
default:
++progress;
/*-----------------------------------------------+
| |
| build code in here |
| |
+-----------------------------------------------*/
return SUCCESS;
}
return !SUCCESS;
}
/*----------------------------------------------------------------------+
|
| name main
|
+----------------------------------------------------------------------*/
Public void main
(
)
{
int status;
char errStr[25];
status = mdlDialog_busyBarStartProcessing (proLoop,
NULL,
NULL,
NULL,
NULL,
0,
"We are NOW processing!",
"Processing NOW!");
sprintf(errStr, "Return value is %d\n",status );
mdlOutput_error(errStr);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -