Leaked source code of windows server 2003
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.

84 lines
2.1 KiB

  1. //=======================================================================
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: customlb.h
  6. //
  7. // Creator: weiw
  8. //
  9. // Purpose: custom list box header file
  10. //
  11. //=======================================================================
  12. #pragma once
  13. #define XBITMAP 20
  14. // ATTENTION_COLOR: color for link when mouse is over
  15. // NOATTENTION_COLOR: otherwise
  16. //#define NOATTENTION_COLOR COLOR_GRAYTEXT
  17. #define ATTENTION_COLOR COLOR_HOTLIGHT
  18. // Foward declarations of functions included in this code module:
  19. #define MAX_RTF_LENGTH 80 //in charaters
  20. #define MAX_TITLE_LENGTH 300
  21. #define MAX_DESC_LENGTH 3000 // 750 in the spec, leave room to adapt
  22. #define DEF_CHECK_HEIGHT 13
  23. #define SECTION_SPACING 6 //spacing between title, description and RTF
  24. #define TITLE_MARGIN 6 //margin at the left and right for title
  25. #define RTF_MARGIN 20 //margin at the right of rtf
  26. #define MAX_RTFSHORTCUTDESC_LENGTH 140
  27. class LBITEM
  28. {
  29. public:
  30. TCHAR szTitle[MAX_TITLE_LENGTH];
  31. LPTSTR pszDescription;
  32. TCHAR szRTF[MAX_RTF_LENGTH];
  33. UINT m_index; // index of item in gvList
  34. BOOL bSelect;
  35. BOOL bRTF;
  36. RECT rcTitle;
  37. RECT rcText;
  38. RECT rcBitmap; // weiwfixcode: missleading name. the same as rcTitle
  39. RECT rcRTF;
  40. RECT rcItem;
  41. //int xTitle; // extra len for the title hit point
  42. public:
  43. LBITEM()
  44. {
  45. ZeroMemory(szTitle, sizeof(szTitle));
  46. ZeroMemory(szRTF, sizeof(szRTF));
  47. ZeroMemory(&rcTitle, sizeof(rcTitle));
  48. ZeroMemory(&rcText, sizeof(rcText));
  49. ZeroMemory(&rcBitmap, sizeof(rcBitmap));
  50. ZeroMemory(&rcRTF, sizeof(rcRTF));
  51. ZeroMemory(&rcItem, sizeof(rcItem));
  52. bSelect = FALSE;
  53. bRTF = FALSE;
  54. pszDescription = NULL;
  55. }
  56. ~LBITEM()
  57. {
  58. if (NULL != pszDescription)
  59. {
  60. free(pszDescription);
  61. }
  62. }
  63. };
  64. typedef enum tagMYLBFOCUS {
  65. MYLB_FOCUS_TITLE =1,
  66. MYLB_FOCUS_RTF
  67. } MYLBFOCUS;
  68. const TCHAR MYLBALIVEPROP[] = TEXT("MYLBAlive");
  69. extern HWND ghWndList;
  70. extern INT gFocusItemId;
  71. extern TCHAR gtszRTFShortcut[MAX_RTFSHORTCUTDESC_LENGTH];