/********************************************************************* * * GUI_ExecCreatedDialog */ int GUI_ExecCreatedDialog (WM_HWIN hDialog) { WM_DIALOG_STATUS DialogStatus = {0}; /* Let window know how to send feedback (close info & return value) */ GUI_SetDialogStatusPtr(hDialog, &DialogStatus); while (!DialogStatus.Done) { if (!GUI_Exec()) { GUI_WaitEvent(); /* 等待事件(键盘,鼠标或任何) */ } } return DialogStatus.ReturnValue; }
static int GUI_WaitForDialogExec (WM_HWIN hDialog) { WM_DIALOG_STATUS DialogStatus = {0}; GUI_SetDialogStatusPtr(hDialog, &DialogStatus); while (!DialogStatus.Done) { if (!GUI_Exec()) { GUI_Delay(100); } } return DialogStatus.ReturnValue; }
/********************************************************************* * * GUI_ExecCreatedDialog */ int GUI_ExecCreatedDialog (WM_HWIN hDialog) { WM_DIALOG_STATUS DialogStatus = {0}; /* Let window know how to send feedback (close info & return value) */ GUI_SetDialogStatusPtr(hDialog, &DialogStatus); while (!DialogStatus.Done) { if (!GUI_Exec()) { GUI_X_WAIT_EVENT(); /* Wait for event (keyboard, mouse or whatever) */ } } return DialogStatus.ReturnValue; }