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.

329 lines
18 KiB

  1. // ==================================================================
  2. // Copyright 1990-1993 Microsoft corporation
  3. // all rights reservered
  4. // ==================================================================
  5. //
  6. // MODULE: COLUMNLB.H
  7. // PURPOSE: Definitions of all external procedure prototypes for custom
  8. // window class ColumnLB
  9. //
  10. // ------ TABSTOP = 4 -------------------
  11. //
  12. // HISTORY
  13. // -------
  14. // Tom Laird-McConnell 5/1/93 Created
  15. // ==================================================================
  16. #ifndef _COLUMNLB_
  17. #define _COLUMNLB_
  18. #ifdef __cplusplus
  19. extern "C"{
  20. #endif
  21. //
  22. // CONTROL STYLES
  23. //
  24. #define CLBS_NOTIFYLMOUSE 0x0200L // pass on WM_LMOUSE messages to perent
  25. #define CLBS_NOTIFYRMOUSE 0x0800L // pass on WM_RMOUSE messages to parent
  26. //
  27. // CONTROL MESSAGES
  28. //
  29. #define CLB_BASE (WM_USER+4000)
  30. #define CLB_MSGMIN (CLB_BASE)
  31. #define CLB_GETNUMBERCOLS (CLB_BASE+0) // get the number of columns (ret=NumCols)
  32. #define CLB_SETNUMBERCOLS (CLB_BASE+1) // set the number of columns (wparam=NumCols)
  33. #define CLB_GETCOLWIDTH (CLB_BASE+2) // get a column width (wParm=Column ret=ColWidth in DU's)
  34. #define CLB_SETCOLWIDTH (CLB_BASE+3) // set a column width (wParm=Column lParam=Width)
  35. #define CLB_GETCOLTITLE (CLB_BASE+4) // get a column's title (wParm=Column, ret=Title)
  36. #define CLB_SETCOLTITLE (CLB_BASE+5) // set a column's title (wParm=Col, lParm=Title)
  37. #define CLB_GETSORTCOL (CLB_BASE+6) // get the sort column (ret=Col)
  38. #define CLB_SETSORTCOL (CLB_BASE+7) // set the sort column (wParm=Col)
  39. #define CLB_AUTOWIDTH (CLB_BASE+8) // auto-matically set column widths using titles...
  40. #define CLB_GETCOLOFFSETS (CLB_BASE+9) // gets the incremental col offsets (ret=LPINT array)
  41. #define CLB_SETCOLOFFSETS (CLB_BASE+10)
  42. #define CLB_GETCOLORDER (CLB_BASE+11) // get the order that columns should be displayed(ret=LPBYTE table)
  43. #define CLB_SETCOLORDER (CLB_BASE+12) // set the order that columns should be displayed(LParm=LPBYTE TABLE)
  44. #define CLB_HSCROLL (CLB_BASE+13) // a hscroll event (INTERNAL)
  45. #define CLB_GETFOCUS (CLB_BASE+14) // get the primary key focus window of CLB
  46. #define CLB_GETROWCOLTEXT (CLB_BASE+15) // given a row AND a column, give me the text for the physical column.
  47. #define CLB_GETTEXTPTRS (CLB_BASE+16) // just like gettext, but it give the array of pointers to the strings.
  48. #define CLB_CHECKFOCUS (CLB_BASE+17) // Does this listbox have the focus?
  49. /*
  50. * Listbox messages (Defined as CLB_BASE+0+LB_ADDSTRING...to get original LB_ message, just take msg-CLB_BASE to get LB_
  51. */
  52. #define CLB_LISTBOX_MSGMIN (CLB_MSGMIN+LB_ADDSTRING )
  53. #define CLB_ADDSTRING (CLB_MSGMIN+LB_ADDSTRING )
  54. #define CLB_INSERTSTRING (CLB_MSGMIN+LB_INSERTSTRING )
  55. #define CLB_DELETESTRING (CLB_MSGMIN+LB_DELETESTRING )
  56. #define CLB_SELITEMRANGEEX (CLB_MSGMIN+LB_SELITEMRANGEEX )
  57. #define CLB_RESETCONTENT (CLB_MSGMIN+LB_RESETCONTENT )
  58. #define CLB_SETSEL (CLB_MSGMIN+LB_SETSEL )
  59. #define CLB_SETCURSEL (CLB_MSGMIN+LB_SETCURSEL )
  60. #define CLB_GETSEL (CLB_MSGMIN+LB_GETSEL )
  61. #define CLB_GETCURSEL (CLB_MSGMIN+LB_GETCURSEL )
  62. #define CLB_GETTEXT (CLB_MSGMIN+LB_GETTEXT )
  63. #define CLB_GETTEXTLEN (CLB_MSGMIN+LB_GETTEXTLEN )
  64. #define CLB_GETCOUNT (CLB_MSGMIN+LB_GETCOUNT )
  65. #define CLB_SELECTSTRING (CLB_MSGMIN+LB_SELECTSTRING )
  66. #define CLB_DIR (CLB_MSGMIN+LB_DIR )
  67. #define CLB_GETTOPINDEX (CLB_MSGMIN+LB_GETTOPINDEX )
  68. #define CLB_FINDSTRING (CLB_MSGMIN+LB_FINDSTRING )
  69. #define CLB_GETSELCOUNT (CLB_MSGMIN+LB_GETSELCOUNT )
  70. #define CLB_GETSELITEMS (CLB_MSGMIN+LB_GETSELITEMS )
  71. #define CLB_SETTABSTOPS (CLB_MSGMIN+LB_SETTABSTOPS )
  72. #define CLB_GETHORIZONTALEXTENT (CLB_MSGMIN+LB_GETHORIZONTALEXTENT)
  73. #define CLB_SETHORIZONTALEXTENT (CLB_MSGMIN+LB_SETHORIZONTALEXTENT)
  74. #define CLB_SETCOLUMNWIDTH (CLB_MSGMIN+LB_SETCOLUMNWIDTH )
  75. #define CLB_ADDFILE (CLB_MSGMIN+LB_ADDFILE )
  76. #define CLB_SETTOPINDEX (CLB_MSGMIN+LB_SETTOPINDEX )
  77. #define CLB_GETITEMRECT (CLB_MSGMIN+LB_GETITEMRECT )
  78. #define CLB_GETITEMDATA (CLB_MSGMIN+LB_GETITEMDATA )
  79. #define CLB_SETITEMDATA (CLB_MSGMIN+LB_SETITEMDATA )
  80. #define CLB_SELITEMRANGE (CLB_MSGMIN+LB_SELITEMRANGE )
  81. #define CLB_SETANCHORINDEX (CLB_MSGMIN+LB_SETANCHORINDEX )
  82. #define CLB_GETANCHORINDEX (CLB_MSGMIN+LB_GETANCHORINDEX )
  83. #define CLB_SETCARETINDEX (CLB_MSGMIN+LB_SETCARETINDEX )
  84. #define CLB_GETCARETINDEX (CLB_MSGMIN+LB_GETCARETINDEX )
  85. #define CLB_SETITEMHEIGHT (CLB_MSGMIN+LB_SETITEMHEIGHT )
  86. #define CLB_GETITEMHEIGHT (CLB_MSGMIN+LB_GETITEMHEIGHT )
  87. #define CLB_FINDSTRINGEXACT (CLB_MSGMIN+LB_FINDSTRINGEXACT )
  88. #define CLB_SETLOCALE (CLB_MSGMIN+LB_SETLOCALE )
  89. #define CLB_GETLOCALE (CLB_MSGMIN+LB_GETLOCALE )
  90. #define CLB_SETCOUNT (CLB_MSGMIN+LB_SETCOUNT )
  91. #define CLB_LISTBOX_MSGMAX CLB_SETCOUNT
  92. #define CLB_MSGMAX CLB_LISTBOX_MSGMAX
  93. //
  94. // NOTIFICATION MESSAGES
  95. //
  96. #define CLBN_MSGMIN (CLB_MSGMAX + 1)
  97. #define CLBN_DRAWITEM CLBN_MSGMIN // ask the parent to do a XXXXitem lParam = LPDRAWITEMSTRUCT)
  98. //#define CLBN_COMPAREITEM CLBN_MSGMIN+2) // ask the parent to do a XXXXitem (wParam=PhysCol, lParam = LPCOMPAREITEMSTRUCT)
  99. #define CLBN_CHARTOITEM (CLBN_MSGMIN+3) // ask the parent to do a XXXXitem (wParam=PhysCol, )
  100. #define CLBN_TITLESINGLECLK (CLBN_MSGMIN+4) // notify the parent that a user clicked on a title (wParam = CTLID, lParam=Col)
  101. #define CLBN_TITLEDBLCLK (CLBN_MSGMIN+5) // notify the parent that a user double-clicked on a title (wParam = CTLID, lParam=Col)
  102. #define CLBN_COLREORDER (CLBN_MSGMIN+6) // notify the parent that someone changed the column order (LPARAM=LPINT order)
  103. #define CLBN_COLSIZE (CLBN_MSGMIN+7) // notify the parent that someone changed the column size (lParam=LPINT widths)
  104. #define CLBN_RBUTTONDOWN (CLBN_MSGMIN+8) // notify the parent on rbutton which row and column
  105. #define CLBN_RBUTTONUP (CLBN_MSGMIN+9) // notify the parent on rbutton which row and column
  106. #define CLBN_MSGMAX CLBN_RBUTTONUP
  107. #define MAX_COLUMNS 32
  108. //
  109. // structure used to keep track of column info
  110. //
  111. typedef struct _ColumnInfo
  112. {
  113. int Width; // width in LU's of column
  114. LPTSTR lpTitle; // pointer to title string
  115. BOOL fDepressed; // flag for whether this columns header button is depressed or not
  116. } COLUMNINFO;
  117. typedef COLUMNINFO *LPCOLUMNINFO;
  118. //
  119. // structure used for doing a Column DrawItem
  120. //
  121. typedef struct _CLBDrawItemStruct
  122. {
  123. DRAWITEMSTRUCT DrawItemStruct;
  124. LPBYTE lpColOrder;
  125. DWORD nColumns;
  126. RECT rect[MAX_COLUMNS];
  127. } CLBDRAWITEMSTRUCT;
  128. typedef CLBDRAWITEMSTRUCT *LPCLBDRAWITEMSTRUCT;
  129. #define MOUSE_COLUMNDRAG 1
  130. #define MOUSE_COLUMNRESIZE 2
  131. #define MOUSE_COLUMNCLICK 3
  132. //
  133. // internal datastructure used to keep track of everything internal to the
  134. // ColumnLB class...
  135. //
  136. typedef struct _ColumnLBstruct
  137. {
  138. DWORD Style; // style of columnlb
  139. HWND hwndList; // handle to the internal listbox
  140. HWND hwndTitleList; // handle to title listbox
  141. HFONT hFont; // font in use...
  142. HINSTANCE hInstance; // hInstance of the app which created this
  143. BYTE nColumns; // number of columns in the column listbox
  144. COLUMNINFO ColumnInfoTable[MAX_COLUMNS]; // table of ColumnInfoStructures
  145. int ColumnOffsetTable[MAX_COLUMNS]; // table of offsets from front of listbox (in lu's)
  146. BYTE ColumnOrderTable[MAX_COLUMNS]; // indexes of columns in order of display
  147. BYTE SortColumn; // index of current sort column
  148. int xPos; // current x position in scroll-box
  149. int yTitle; // height of title portion...
  150. FARPROC OldListboxProc; // old listbox proc
  151. FARPROC NewListboxProc; // New listbox proc
  152. FARPROC OldTitleListboxProc; // old listbox proc
  153. FARPROC NewTitleListboxProc; // New listbox proc
  154. BYTE fUseVlist:1; // flag for whether to use VLIST class or not...
  155. BYTE fMouseState:3; // state for moving
  156. BYTE fSorting:1; // flag to signifiy that we are sorting so ignore DELETEITEM's
  157. BYTE fHasFocus:1; // does the listbox have the focus?
  158. int xPrevPos ; // previous x mouse position
  159. BYTE ColClickStart; // column of click start
  160. RECT ColClickRect; // rect of click column
  161. } COLUMNLBSTRUCT;
  162. typedef COLUMNLBSTRUCT FAR *LPCOLUMNLBSTRUCT;
  163. #define COLUMNLBCLASS_CLASSNAME TEXT("ColumnListBox") // normal Column listbox
  164. #define COLUMNVLBCLASS_CLASSNAME TEXT("ColumnVListBox") // Vlist Column box
  165. //
  166. // structure used for RBUTTONDOWN messages. The Column list box tells the parent
  167. // which column and index.
  168. //
  169. typedef struct _CLBRButtonStruct
  170. {
  171. HWND hwndChild;
  172. BYTE PhysColumn;
  173. DWORD_PTR Index;
  174. int x;
  175. int y;
  176. } CLBRBUTTONSTRUCT;
  177. typedef CLBRBUTTONSTRUCT *LPCLBRBUTTONSTRUCT;
  178. //
  179. // function prototypes
  180. //
  181. BOOL ColumnLBClass_Register(HINSTANCE hInstance);
  182. BOOL ColumnVLBClass_Register(HINSTANCE hInstance);
  183. BOOL ColumnLBClass_Unregister(HINSTANCE hInstance);
  184. BOOL ColumnVLBClass_Unregister(HINSTANCE hInstance);
  185. void ColumnLB_DrawColumnBorder(HDC hdc, RECT *rect, int Bottom, HBRUSH hBrush);
  186. // -----------------------------------------------------------------------------------
  187. //
  188. // ColumnListBox_ Macros (uses CLB_ messages) New definitions
  189. //
  190. #define ColumnLB_GetNumberCols(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETNUMBERCOLS, 0L, (LPARAM)0))
  191. #define ColumnLB_SetNumberCols(hwndCtl,Number) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETNUMBERCOLS, (WPARAM)Number, (LPARAM)0))
  192. #define ColumnLB_GetColWidth(hwndCtl,Column) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETCOLWIDTH, (WPARAM)Column, (LPARAM)0))
  193. #define ColumnLB_SetColWidth(hwndCtl,Column, Width) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETCOLWIDTH, (WPARAM)Column, (LPARAM)Width))
  194. #define ColumnLB_GetColTitle(hwndCtl,Column) ((LPTSTR)(DWORD)SendMessage((hwndCtl), CLB_GETCOLTITLE, (WPARAM)Column, (LPARAM)0))
  195. #define ColumnLB_SetColTitle(hwndCtl,Column, Title) ((LPTSTR)(DWORD)SendMessage((hwndCtl), CLB_SETCOLTITLE, (WPARAM)Column, (LPARAM)Title))
  196. #define ColumnLB_GetSortCol(hwndCtl) ((DWORD)SendMessage((hwndCtl), CLB_GETSORTCOL, (WPARAM)0, (LPARAM)0))
  197. #define ColumnLB_SetSortCol(hwndCtl,Column) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETSORTCOL, (WPARAM)Column, (LPARAM)0))
  198. #define ColumnLB_AutoWidth(hwndCtl, Width) ((int)(DWORD)SendMessage((hwndCtl), CLB_AUTOWIDTH, (WPARAM)Width, (LPARAM)0))
  199. #define ColumnLB_GetColOffsets(hwndCtl) ((LPINT)(DWORD)SendMessage((hwndCtl), CLB_GETCOLOFFSETS, (WPARAM)0, (LPARAM)0))
  200. #define ColumnLB_SetColOffsets(hwndCtl,Offsets) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETCOLOFFSETS, (WPARAM)Offsets, (LPARAM)0))
  201. #define ColumnLB_GetColOrder(hwndCtl) ((LPBYTE)(DWORD)SendMessage((hwndCtl), CLB_GETCOLORDER, (WPARAM)0, (LPARAM)0))
  202. #define ColumnLB_SetColOrder(hwndCtl, Order) ((LPBYTE)(DWORD)SendMessage((hwndCtl), CLB_SETCOLORDER, (WPARAM)0, (LPARAM)Order))
  203. #define ColumnLB_CheckFocus(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CLB_CHECKFOCUS, (WPARAM)0, (LPARAM)0))
  204. // -----------------------------------------------------------------------------------
  205. //
  206. // ColumnListBox_ Macros (uses CLB_ messages) Listbox definitions
  207. //
  208. #define ColumnLB_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
  209. #define ColumnLB_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETCOUNT, 0L, 0L))
  210. #define ColumnLB_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CLB_RESETCONTENT, 0L, 0L))
  211. #define ColumnLB_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CLB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(lpsz)))
  212. #define ColumnLB_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CLB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpsz)))
  213. #define ColumnLB_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), CLB_ADDSTRING, 0L, (LPARAM)(data)))
  214. #define ColumnLB_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CLB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data)))
  215. #define ColumnLB_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_DELETESTRING, (WPARAM)(int)(index), 0L))
  216. #define ColumnLB_GetTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETTEXTLEN, (WPARAM)(int)(index), 0L))
  217. #define ColumnLB_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpszBuffer)))
  218. #define ColumnLB_GetTextPtrs(hwndCtl, index) ((LPTSTR *)(DWORD)SendMessage((hwndCtl), CLB_GETTEXTPTRS, (WPARAM)(int)(index), (LPARAM)0))
  219. #define ColumnLB_GetRowColText(hwndCtl, index, col) (LPBYTE)(DWORD)SendMessage((hwndCtl), CLB_GETROWCOLTEXT, (WPARAM)(int) (col), (LPARAM)(int)(index))
  220. #define ColumnLB_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), CLB_GETITEMDATA, (WPARAM)(int)(index), 0L))
  221. #define ColumnLB_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
  222. #if (WINVER >= 0x030a)
  223. #define ColumnLB_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CLB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
  224. #define ColumnLB_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CLB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
  225. #define ColumnLB_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETSEL, (WPARAM)(BOOL)(fSelect), (LPARAM)(index)))
  226. #define ColumnLB_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SendMessage((hwndCtl), CLB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last))))
  227. #define ColumnLB_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETCURSEL, 0L, 0L))
  228. #define ColumnLB_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETCURSEL, (WPARAM)(int)(index), 0L))
  229. #define ColumnLB_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CLB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
  230. #define ColumnLB_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CLB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
  231. #define ColumnLB_GetSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETSEL, (WPARAM)(int)(index), 0L))
  232. #define ColumnLB_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETSELCOUNT, 0L, 0L))
  233. #define ColumnLB_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETTOPINDEX, 0L, 0L))
  234. #define ColumnLB_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int *)(lpItems)))
  235. #define ColumnLB_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L))
  236. #define ColumnLB_SetColumnWidth(hwndCtl, cxColumn) ((void)SendMessage((hwndCtl), CLB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L))
  237. #define ColumnLB_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETHORIZONTALEXTENT, 0L, 0L))
  238. #define ColumnLB_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SendMessage((hwndCtl), CLB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L))
  239. #define ColumnLB_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl), CLB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int *)(lpTabs)))
  240. #define ColumnLB_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT *)(lprc)))
  241. #define ColumnLB_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETCARETINDEX, (WPARAM)(int)(index), 0L))
  242. #define ColumnLB_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETCARETINDEX, 0L, 0L))
  243. #define ColumnLB_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CLB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
  244. #define ColumnLB_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), CLB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0)))
  245. #define ColumnLB_GetItemHeight(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CLB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L))
  246. #endif /* WINVER >= 0x030a */
  247. #define ColumnLB_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), CLB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCTSTR)(lpszFileSpec)))
  248. #define ColumnLB_GetFocus(hwndCtl) ((HWND)(DWORD)SendMessage((hwndCtl), CLB_GETFOCUS, 0L, 0L))
  249. #ifdef __cplusplus
  250. }
  251. #endif
  252. #endif