dialog.h
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:3k
源码类别:

操作系统开发

开发平台:

Visual C++

  1. /*
  2.      COW : Character Oriented Windows
  3. dialog.h: Dialog cow private interface
  4. */
  5. /* special characters in dialog static strings */
  6. #define chPrefix1 '~' /* tilde => accelerator */
  7. #define chPrefix2 ((char) 247) /* double tilde => hidden accelerator */
  8. extern BYTE fShowDlgAccel; /* show dialog accelerators ? */
  9. extern BYTE fButtonAction; /* TRUE => mouse button down on button */
  10. extern PWND pwndCapture;
  11. #define FCaptured(pwnd) ((pwnd) == pwndCapture)
  12. PRIVATE BYTE fDrawItem;
  13. PRIVATE BYTE fRedrawItem;
  14. /* WndProcs must be the same size as all public entries */
  15. DWORD FARPUBLIC DialogWndProc(PWND, WORD, WORD, DWORD);
  16. WORD FARPRIVATE DialogBox(PWND, PLFN);
  17. VOID FARPRIVATE EndDialog(PWND, WORD);
  18. WORD FARPRIVATE GetDlgItemText(PWND, char *, WORD);
  19. VOID FARPRIVATE SetDlgItemText(PWND, char *, BOOL);
  20. VOID FARPRIVATE DlgDirList(PWND, char *, PWND, BOOL, PWND);
  21. BOOL FARPRIVATE DlgDirSelect(PWND, char *, PWND);
  22. BOOL FARPRIVATE FMaybeDir(char *);
  23. VOID FARPRIVATE AddListString(PWND, char *);
  24. WORD FARPRIVATE  GetListText(PWND, char *, WORD);
  25. WORD FARPRIVATE  CwSizeDialog(ARC *);
  26. #define CbSizeDialog(parc) (CwSizeDialog(parc)<<1)
  27. /* Common portion of all dialog windows */
  28. #define cwExtraMin 1 /* at least 1 field for all items */
  29. /* not used for dialog box */
  30. #define aclDialog rgwExtra[0] /* dialog accelerator */
  31. /* Text info for : edit, static and button controls */
  32. #define cwExtraText (cwExtraMin+2) /* 2 more for text controls */
  33. #define szDialog rgwExtra[1] /* also Dialog Box caption */
  34. #define cchDialog rgwExtra[2] /* edit, static & buttons */
  35. /* flag indicating whether EndDialog has been
  36.    called.  Used to prevent multiple calls
  37.    to PostQuitMessage */
  38. #define wParamEnd rgwExtra[2]
  39. /* sizes of rgwExtra for the various controls */
  40. #define cwExtraDialog (cwExtraMin+2) /* szDialog + fEndDb */
  41. #define cwExtraStatic (cwExtraText) /* simple text */
  42. #define cwExtraButton (cwExtraText+2) /* text + button state + next radio */
  43. #define cwExtraEdit (cwExtraText+10) /* see edit.h for details */
  44. #define cwExtraGeneral (cwExtraMin+2) /* see general.h for details */
  45. #ifndef LISTBOX_HORIZ
  46. #define cwExtraListBox (cwExtraMin+14) /* see _listbox.h for details */
  47. #else
  48. #define cwExtraListBox (cwExtraMin+16) /* see _listbox.h for details */
  49. #endif /*LISTBOX_HORIZ*/
  50. /* Dialog Accelerator control */
  51. #define aclNil 0 /* no accelerator */
  52. #ifndef KANJI
  53. /* non-Kanji : single character within first 16 characters */
  54. #define ChAccel(pwnd) LOBYTE((pwnd)->aclDialog)
  55. #define IchAccel(pwnd) HIBYTE((pwnd)->aclDialog)
  56. #else
  57. /* Kanji : either Roman or Kana - first character only */
  58. #define ChAccel(pwnd) (fKanaAccel ? HIBYTE(pwnd->aclDialog) : 
  59.     LOBYTE(pwnd->aclDialog))
  60. #define IchAccel(pwnd) 0
  61. #endif