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.

74 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. fontdlg.h
  5. Abstract:
  6. This module contains the definitions for console font dialog
  7. Author:
  8. Therese Stowell (thereses) Feb-3-1992 (swiped from Win3.1)
  9. Revision History:
  10. --*/
  11. #ifndef FONTDLG_H
  12. #define FONTDLG_H
  13. /* ----- Literals ----- */
  14. #define MAXDIMENSTRING 40 // max text in combo box
  15. #define DX_TTBITMAP 20
  16. #define DY_TTBITMAP 12
  17. #define CCH_RASTERFONTS 24
  18. #define CCH_SELECTEDFONT 30
  19. /* ----- Macros ----- */
  20. /*
  21. * High-level macros
  22. *
  23. * These macros handle the SendMessages that go tofrom list boxes
  24. * and combo boxes.
  25. *
  26. * The "xxx_lcb" prefix stands for leaves CritSect & "list or combo box".
  27. *
  28. * Basically, we're providing mnemonic names for what would otherwise
  29. * look like a whole slew of confusing SendMessage's.
  30. *
  31. */
  32. #define lcbRESETCONTENT(hWnd, bLB) \
  33. SendMessage(hWnd, bLB ? LB_RESETCONTENT : CB_RESETCONTENT, 0, 0L)
  34. #define lcbGETTEXT(hWnd, bLB, w) \
  35. SendMessage(hWnd, bLB ? LB_GETTEXT : CB_GETLBTEXT, w, 0L)
  36. #define lcbFINDSTRINGEXACT(hWnd, bLB, pwsz) \
  37. (LONG)SendMessage(hWnd, bLB ? LB_FINDSTRINGEXACT : CB_FINDSTRINGEXACT, \
  38. (WPARAM)-1, (LPARAM)pwsz)
  39. #define lcbADDSTRING(hWnd, bLB, pwsz) \
  40. (LONG)SendMessage(hWnd, bLB ? LB_ADDSTRING : CB_ADDSTRING, 0, (LPARAM)pwsz)
  41. #define lcbSETITEMDATA(hWnd, bLB, w, nFont) \
  42. SendMessage(hWnd, bLB ? LB_SETITEMDATA : CB_SETITEMDATA, w, nFont)
  43. #define lcbGETITEMDATA(hWnd, bLB, w) \
  44. (LONG)SendMessage(hWnd, bLB ? LB_GETITEMDATA : CB_GETITEMDATA, w, 0L)
  45. #define lcbGETCOUNT(hWnd, bLB) \
  46. (LONG)SendMessage(hWnd, bLB ? LB_GETCOUNT : CB_GETCOUNT, 0, 0L)
  47. #define lcbGETCURSEL(hWnd, bLB) \
  48. (LONG)SendMessage(hWnd, bLB ? LB_GETCURSEL : CB_GETCURSEL, 0, 0L)
  49. #define lcbSETCURSEL(hWnd, bLB, w) \
  50. SendMessage(hWnd, bLB ? LB_SETCURSEL : CB_SETCURSEL, w, 0L)
  51. #endif /* #ifndef FONTDLG_H */