Exemplo n.º 1
0
/*********************************************************************
*
*       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;
}
Exemplo n.º 2
0
/*********************************************************************
*
*       GUI_WaitKey
*/
int GUI_WaitKey(void) {
  int r;
  do {
    r =  GUI_GetKey();
    if (r) {
      break;
    }
    if (!GUI_Exec()) {
      GUI_WaitEvent();      /* Wait for event (keyboard, mouse or whatever) */
    }
  } while (1);
  return r;
}