Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. #include "dialog.h"
  2. /* dialog box resource id's */
  3. #define ABOUTDLG 1
  4. #define DELAYDLG 2
  5. #define FILEDLG 3
  6. #define ID_APP 1000
  7. /* Menu Items */
  8. #define MENU_SAVE 1
  9. #define MENU_LOAD 2
  10. #define MENU_ABOUT 3
  11. #define MENU_EXIT 4
  12. #define MENU_DELAY 5
  13. #define MENU_TIME 6
  14. #define MENU_PERIODIC 100
  15. #define MENU_ONESHOT 200
  16. // fake ID for fake message to update the list box if a one-shot event is done
  17. #define ID_UPDATEDISPLAY WM_USER + 5000
  18. #define MM_TIMEEVENT WM_USER + 20
  19. /*------------------------------------------------------------)-----------)---*\
  20. | |
  21. | f u n c t i o n d e f i n i t i o n s |
  22. | |
  23. \*----------------------------------------------------------------------------*/
  24. extern void PASCAL DelayDlgCmd( HWND hDlg, UINT wParam, LONG lParam );
  25. extern TIMECALLBACK TimeCallback;
  26. extern void PASCAL ErrMsg(char *sz);
  27. extern void PASCAL KillAllEvents(void);
  28. extern void PASCAL Idle(void);
  29. #define MAXEVENTS 20
  30. typedef struct timerevent_tag {
  31. WORD wDelay; // delay required
  32. WORD wResolution; // resolution required
  33. LPTIMECALLBACK lpFunction; // ptr to callback function
  34. DWORD dwUser; // user DWORD
  35. WORD wFlags; // defines how to program event
  36. } TIMEREVENT;
  37. typedef TIMEREVENT FAR *LPTIMEREVENT;
  38. typedef struct My_Event_Struct_tag {
  39. BOOL bActive;
  40. BOOL bPeriodic;
  41. BOOL bHit;
  42. WORD nID;
  43. TIMEREVENT teEvent;
  44. DWORD dwCount;
  45. DWORD dwError;
  46. WORD wStart;
  47. LONG time;
  48. LONG dtime;
  49. LONG dtimeMin;
  50. LONG dtimeMax;
  51. } EVENTLIST;
  52.