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.

10515 lines
343 KiB

  1. /*****************************************************************************\
  2. * *
  3. * commctrl.h - - Interface for the Windows Common Controls *
  4. * *
  5. * Version 1.2 *
  6. * *
  7. * Copyright (c) Microsoft Corporation. All rights reserved. *
  8. * *
  9. \*****************************************************************************/
  10. #ifndef _INC_COMMCTRL
  11. #define _INC_COMMCTRL
  12. #ifndef _WINRESRC_
  13. #ifndef _WIN32_IE
  14. #define _WIN32_IE 0x0501
  15. #else
  16. #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
  17. #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
  18. #endif
  19. #endif
  20. #endif
  21. #ifndef _HRESULT_DEFINED
  22. #define _HRESULT_DEFINED
  23. typedef LONG HRESULT;
  24. #endif // _HRESULT_DEFINED
  25. #ifndef NOUSER
  26. //
  27. // Define API decoration for direct importing of DLL references.
  28. //
  29. #ifndef WINCOMMCTRLAPI
  30. #if !defined(_COMCTL32_) && defined(_WIN32)
  31. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  32. #else
  33. #define WINCOMMCTRLAPI
  34. #endif
  35. #endif // WINCOMMCTRLAPI
  36. //
  37. // For compilers that don't support nameless unions
  38. //
  39. #ifndef DUMMYUNIONNAME
  40. #ifdef NONAMELESSUNION
  41. #define DUMMYUNIONNAME u
  42. #define DUMMYUNIONNAME2 u2
  43. #define DUMMYUNIONNAME3 u3
  44. #define DUMMYUNIONNAME4 u4
  45. #define DUMMYUNIONNAME5 u5
  46. #else
  47. #define DUMMYUNIONNAME
  48. #define DUMMYUNIONNAME2
  49. #define DUMMYUNIONNAME3
  50. #define DUMMYUNIONNAME4
  51. #define DUMMYUNIONNAME5
  52. #endif
  53. #endif // DUMMYUNIONNAME
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. //
  58. // Users of this header may define any number of these constants to avoid
  59. // the definitions of each functional group.
  60. //
  61. // NOTOOLBAR Customizable bitmap-button toolbar control.
  62. // NOUPDOWN Up and Down arrow increment/decrement control.
  63. // NOSTATUSBAR Status bar control.
  64. // NOMENUHELP APIs to help manage menus, especially with a status bar.
  65. // NOTRACKBAR Customizable column-width tracking control.
  66. // NODRAGLIST APIs to make a listbox source and sink drag&drop actions.
  67. // NOPROGRESS Progress gas gauge.
  68. // NOHOTKEY HotKey control
  69. // NOHEADER Header bar control.
  70. // NOIMAGEAPIS ImageList apis.
  71. // NOLISTVIEW ListView control.
  72. // NOTREEVIEW TreeView control.
  73. // NOTABCONTROL Tab control.
  74. // NOANIMATE Animate control.
  75. // NOBUTTON Button control.
  76. // NOSTATIC Static control.
  77. // NOEDIT Edit control.
  78. // NOLISTBOX Listbox control.
  79. // NOCOMBOBOX Combobox control.
  80. // NOSCROLLBAR Scrollbar control.
  81. //
  82. //=============================================================================
  83. #include <prsht.h>
  84. #ifndef SNDMSG
  85. #ifdef __cplusplus
  86. #ifndef _MAC
  87. #define SNDMSG ::SendMessage
  88. #else
  89. #define SNDMSG ::AfxSendMessage
  90. #endif
  91. #else
  92. #ifndef _MAC
  93. #define SNDMSG SendMessage
  94. #else
  95. #define SNDMSG AfxSendMessage
  96. #endif //_MAC
  97. #endif
  98. #endif // ifndef SNDMSG
  99. #ifdef _MAC
  100. #ifndef RC_INVOKED
  101. #ifndef _WLM_NOFORCE_LIBS
  102. #ifndef _WLMDLL
  103. #ifdef _DEBUG
  104. #pragma comment(lib, "comctld.lib")
  105. #else
  106. #pragma comment(lib, "comctl.lib")
  107. #endif
  108. #pragma comment(linker, "/macres:comctl.rsc")
  109. #else
  110. #ifdef _DEBUG
  111. #pragma comment(lib, "msvcctld.lib")
  112. #else
  113. #pragma comment(lib, "msvcctl.lib")
  114. #endif
  115. #endif // _WLMDLL
  116. #endif // _WLM_NOFORCE_LIBS
  117. #endif // RC_INVOKED
  118. #endif //_MAC
  119. WINCOMMCTRLAPI void WINAPI InitCommonControls(void);
  120. #if (_WIN32_IE >= 0x0300)
  121. typedef struct tagINITCOMMONCONTROLSEX {
  122. DWORD dwSize; // size of this structure
  123. DWORD dwICC; // flags indicating which classes to be initialized
  124. } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
  125. #define ICC_LISTVIEW_CLASSES 0x00000001 // listview, header
  126. #define ICC_TREEVIEW_CLASSES 0x00000002 // treeview, tooltips
  127. #define ICC_BAR_CLASSES 0x00000004 // toolbar, statusbar, trackbar, tooltips
  128. #define ICC_TAB_CLASSES 0x00000008 // tab, tooltips
  129. #define ICC_UPDOWN_CLASS 0x00000010 // updown
  130. #define ICC_PROGRESS_CLASS 0x00000020 // progress
  131. #define ICC_HOTKEY_CLASS 0x00000040 // hotkey
  132. #define ICC_ANIMATE_CLASS 0x00000080 // animate
  133. #define ICC_WIN95_CLASSES 0x000000FF
  134. #define ICC_DATE_CLASSES 0x00000100 // month picker, date picker, time picker, updown
  135. #define ICC_USEREX_CLASSES 0x00000200 // comboex
  136. #define ICC_COOL_CLASSES 0x00000400 // rebar (coolbar) control
  137. #if (_WIN32_IE >= 0x0400)
  138. #define ICC_INTERNET_CLASSES 0x00000800
  139. #define ICC_PAGESCROLLER_CLASS 0x00001000 // page scroller
  140. #define ICC_NATIVEFNTCTL_CLASS 0x00002000 // native font control
  141. #endif
  142. #if (_WIN32_WINNT >= 0x501)
  143. #define ICC_STANDARD_CLASSES 0x00004000
  144. #define ICC_LINK_CLASS 0x00008000
  145. #endif
  146. WINCOMMCTRLAPI BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
  147. #endif // _WIN32_IE >= 0x0300
  148. #define ODT_HEADER 100
  149. #define ODT_TAB 101
  150. #define ODT_LISTVIEW 102
  151. //====== Ranges for control message IDs =======================================
  152. #define LVM_FIRST 0x1000 // ListView messages
  153. #define TV_FIRST 0x1100 // TreeView messages
  154. #define HDM_FIRST 0x1200 // Header messages
  155. #define TCM_FIRST 0x1300 // Tab control messages
  156. #if (_WIN32_IE >= 0x0400)
  157. #define PGM_FIRST 0x1400 // Pager control messages
  158. #if (_WIN32_WINNT >= 0x501)
  159. #define ECM_FIRST 0x1500 // Edit control messages
  160. #define BCM_FIRST 0x1600 // Button control messages
  161. #define CBM_FIRST 0x1700 // Combobox control messages
  162. #endif
  163. #define CCM_FIRST 0x2000 // Common control shared messages
  164. #define CCM_LAST (CCM_FIRST + 0x200)
  165. #define CCM_SETBKCOLOR (CCM_FIRST + 1) // lParam is bkColor
  166. typedef struct tagCOLORSCHEME {
  167. DWORD dwSize;
  168. COLORREF clrBtnHighlight; // highlight color
  169. COLORREF clrBtnShadow; // shadow color
  170. } COLORSCHEME, *LPCOLORSCHEME;
  171. #define CCM_SETCOLORSCHEME (CCM_FIRST + 2) // lParam is color scheme
  172. #define CCM_GETCOLORSCHEME (CCM_FIRST + 3) // fills in COLORSCHEME pointed to by lParam
  173. #define CCM_GETDROPTARGET (CCM_FIRST + 4)
  174. #define CCM_SETUNICODEFORMAT (CCM_FIRST + 5)
  175. #define CCM_GETUNICODEFORMAT (CCM_FIRST + 6)
  176. #if (_WIN32_IE >= 0x0500)
  177. #if (_WIN32_WINNT >= 0x501)
  178. #define COMCTL32_VERSION 6
  179. #else
  180. #define COMCTL32_VERSION 5
  181. #endif
  182. #define CCM_SETVERSION (CCM_FIRST + 0x7)
  183. #define CCM_GETVERSION (CCM_FIRST + 0x8)
  184. #define CCM_SETNOTIFYWINDOW (CCM_FIRST + 0x9) // wParam == hwndParent.
  185. #if (_WIN32_WINNT >= 0x501)
  186. #define CCM_SETWINDOWTHEME (CCM_FIRST + 0xb)
  187. #define CCM_DPISCALE (CCM_FIRST + 0xc) // wParam == Awareness
  188. #endif
  189. #endif // (_WIN32_IE >= 0x0500)
  190. #endif // (_WIN32_IE >= 0x0400)
  191. #if (_WIN32_IE >= 0x0400)
  192. // for tooltips
  193. #define INFOTIPSIZE 1024
  194. #endif
  195. //====== WM_NOTIFY Macros =====================================================
  196. #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
  197. (fn)((hwnd), (int)(wParam), (NMHDR *)(lParam))
  198. #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
  199. (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR *)(pnmhdr))
  200. //====== Generic WM_NOTIFY notification codes =================================
  201. #define NM_OUTOFMEMORY (NM_FIRST-1)
  202. #define NM_CLICK (NM_FIRST-2) // uses NMCLICK struct
  203. #define NM_DBLCLK (NM_FIRST-3)
  204. #define NM_RETURN (NM_FIRST-4)
  205. #define NM_RCLICK (NM_FIRST-5) // uses NMCLICK struct
  206. #define NM_RDBLCLK (NM_FIRST-6)
  207. #define NM_SETFOCUS (NM_FIRST-7)
  208. #define NM_KILLFOCUS (NM_FIRST-8)
  209. #if (_WIN32_IE >= 0x0300)
  210. #define NM_CUSTOMDRAW (NM_FIRST-12)
  211. #define NM_HOVER (NM_FIRST-13)
  212. #endif
  213. #if (_WIN32_IE >= 0x0400)
  214. #define NM_NCHITTEST (NM_FIRST-14) // uses NMMOUSE struct
  215. #define NM_KEYDOWN (NM_FIRST-15) // uses NMKEY struct
  216. #define NM_RELEASEDCAPTURE (NM_FIRST-16)
  217. #define NM_SETCURSOR (NM_FIRST-17) // uses NMMOUSE struct
  218. #define NM_CHAR (NM_FIRST-18) // uses NMCHAR struct
  219. #endif
  220. #if (_WIN32_IE >= 0x0401)
  221. #define NM_TOOLTIPSCREATED (NM_FIRST-19) // notify of when the tooltips window is create
  222. #endif
  223. #if (_WIN32_IE >= 0x0500)
  224. #define NM_LDOWN (NM_FIRST-20)
  225. #define NM_RDOWN (NM_FIRST-21)
  226. #define NM_THEMECHANGED (NM_FIRST-22)
  227. #endif
  228. #ifndef CCSIZEOF_STRUCT
  229. #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  230. #endif
  231. //====== Generic WM_NOTIFY notification structures ============================
  232. #if (_WIN32_IE >= 0x0401)
  233. typedef struct tagNMTOOLTIPSCREATED
  234. {
  235. NMHDR hdr;
  236. HWND hwndToolTips;
  237. } NMTOOLTIPSCREATED, * LPNMTOOLTIPSCREATED;
  238. #endif
  239. #if (_WIN32_IE >= 0x0400)
  240. typedef struct tagNMMOUSE {
  241. NMHDR hdr;
  242. DWORD_PTR dwItemSpec;
  243. DWORD_PTR dwItemData;
  244. POINT pt;
  245. LPARAM dwHitInfo; // any specifics about where on the item or control the mouse is
  246. } NMMOUSE, *LPNMMOUSE;
  247. typedef NMMOUSE NMCLICK;
  248. typedef LPNMMOUSE LPNMCLICK;
  249. // Generic structure to request an object of a specific type.
  250. typedef struct tagNMOBJECTNOTIFY {
  251. NMHDR hdr;
  252. int iItem;
  253. #ifdef __IID_DEFINED__
  254. const IID *piid;
  255. #else
  256. const void *piid;
  257. #endif
  258. void *pObject;
  259. HRESULT hResult;
  260. DWORD dwFlags; // control specific flags (hints as to where in iItem it hit)
  261. } NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
  262. // Generic structure for a key
  263. typedef struct tagNMKEY
  264. {
  265. NMHDR hdr;
  266. UINT nVKey;
  267. UINT uFlags;
  268. } NMKEY, *LPNMKEY;
  269. // Generic structure for a character
  270. typedef struct tagNMCHAR {
  271. NMHDR hdr;
  272. UINT ch;
  273. DWORD dwItemPrev; // Item previously selected
  274. DWORD dwItemNext; // Item to be selected
  275. } NMCHAR, *LPNMCHAR;
  276. #endif // _WIN32_IE >= 0x0400
  277. //====== WM_NOTIFY codes (NMHDR.code values) ==================================
  278. #define NM_FIRST (0U- 0U) // generic to all controls
  279. #define NM_LAST (0U- 99U)
  280. #define LVN_FIRST (0U-100U) // listview
  281. #define LVN_LAST (0U-199U)
  282. // Property sheet reserved (0U-200U) - (0U-299U) - see prsht.h
  283. #define HDN_FIRST (0U-300U) // header
  284. #define HDN_LAST (0U-399U)
  285. #define TVN_FIRST (0U-400U) // treeview
  286. #define TVN_LAST (0U-499U)
  287. #define TTN_FIRST (0U-520U) // tooltips
  288. #define TTN_LAST (0U-549U)
  289. #define TCN_FIRST (0U-550U) // tab control
  290. #define TCN_LAST (0U-580U)
  291. // Shell reserved (0U-580U) - (0U-589U)
  292. #define CDN_FIRST (0U-601U) // common dialog (new)
  293. #define CDN_LAST (0U-699U)
  294. #define TBN_FIRST (0U-700U) // toolbar
  295. #define TBN_LAST (0U-720U)
  296. #define UDN_FIRST (0U-721) // updown
  297. #define UDN_LAST (0U-740)
  298. #if (_WIN32_IE >= 0x0300)
  299. #define MCN_FIRST (0U-750U) // monthcal
  300. #define MCN_LAST (0U-759U)
  301. #define DTN_FIRST (0U-760U) // datetimepick
  302. #define DTN_LAST (0U-799U)
  303. #define CBEN_FIRST (0U-800U) // combo box ex
  304. #define CBEN_LAST (0U-830U)
  305. #define RBN_FIRST (0U-831U) // rebar
  306. #define RBN_LAST (0U-859U)
  307. #endif
  308. #if (_WIN32_IE >= 0x0400)
  309. #define IPN_FIRST (0U-860U) // internet address
  310. #define IPN_LAST (0U-879U) // internet address
  311. #define SBN_FIRST (0U-880U) // status bar
  312. #define SBN_LAST (0U-899U)
  313. #define PGN_FIRST (0U-900U) // Pager Control
  314. #define PGN_LAST (0U-950U)
  315. #endif
  316. #if (_WIN32_IE >= 0x0500)
  317. #ifndef WMN_FIRST
  318. #define WMN_FIRST (0U-1000U)
  319. #define WMN_LAST (0U-1200U)
  320. #endif
  321. #endif
  322. #if (_WIN32_WINNT >= 0x0501)
  323. #define BCN_FIRST (0U-1250U)
  324. #define BCN_LAST (0U-1350U)
  325. #endif
  326. #define MSGF_COMMCTRL_BEGINDRAG 0x4200
  327. #define MSGF_COMMCTRL_SIZEHEADER 0x4201
  328. #define MSGF_COMMCTRL_DRAGSELECT 0x4202
  329. #define MSGF_COMMCTRL_TOOLBARCUST 0x4203
  330. #if (_WIN32_IE >= 0x0300)
  331. //==================== CUSTOM DRAW ==========================================
  332. // custom draw return flags
  333. // values under 0x00010000 are reserved for global custom draw values.
  334. // above that are for specific controls
  335. #define CDRF_DODEFAULT 0x00000000
  336. #define CDRF_NEWFONT 0x00000002
  337. #define CDRF_SKIPDEFAULT 0x00000004
  338. #define CDRF_NOTIFYPOSTPAINT 0x00000010
  339. #define CDRF_NOTIFYITEMDRAW 0x00000020
  340. #if (_WIN32_IE >= 0x0400)
  341. #define CDRF_NOTIFYSUBITEMDRAW 0x00000020 // flags are the same, we can distinguish by context
  342. #endif
  343. #define CDRF_NOTIFYPOSTERASE 0x00000040
  344. // drawstage flags
  345. // values under 0x00010000 are reserved for global custom draw values.
  346. // above that are for specific controls
  347. #define CDDS_PREPAINT 0x00000001
  348. #define CDDS_POSTPAINT 0x00000002
  349. #define CDDS_PREERASE 0x00000003
  350. #define CDDS_POSTERASE 0x00000004
  351. // the 0x000010000 bit means it's individual item specific
  352. #define CDDS_ITEM 0x00010000
  353. #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
  354. #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
  355. #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
  356. #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
  357. #if (_WIN32_IE >= 0x0400)
  358. #define CDDS_SUBITEM 0x00020000
  359. #endif
  360. // itemState flags
  361. #define CDIS_SELECTED 0x0001
  362. #define CDIS_GRAYED 0x0002
  363. #define CDIS_DISABLED 0x0004
  364. #define CDIS_CHECKED 0x0008
  365. #define CDIS_FOCUS 0x0010
  366. #define CDIS_DEFAULT 0x0020
  367. #define CDIS_HOT 0x0040
  368. #define CDIS_MARKED 0x0080
  369. #define CDIS_INDETERMINATE 0x0100
  370. #if (_WIN32_WINNT >= 0x501)
  371. #define CDIS_SHOWKEYBOARDCUES 0x0200
  372. #endif
  373. typedef struct tagNMCUSTOMDRAWINFO
  374. {
  375. NMHDR hdr;
  376. DWORD dwDrawStage;
  377. HDC hdc;
  378. RECT rc;
  379. DWORD_PTR dwItemSpec; // this is control specific, but it's how to specify an item. valid only with CDDS_ITEM bit set
  380. UINT uItemState;
  381. LPARAM lItemlParam;
  382. } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
  383. typedef struct tagNMTTCUSTOMDRAW
  384. {
  385. NMCUSTOMDRAW nmcd;
  386. UINT uDrawFlags;
  387. } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
  388. #endif // _WIN32_IE >= 0x0300
  389. //====== IMAGE APIS ===========================================================
  390. #ifndef NOIMAGEAPIS
  391. #define CLR_NONE 0xFFFFFFFFL
  392. #define CLR_DEFAULT 0xFF000000L
  393. #ifndef HIMAGELIST
  394. struct _IMAGELIST;
  395. typedef struct _IMAGELIST* HIMAGELIST;
  396. #endif
  397. #ifndef IMAGELISTDRAWPARAMS
  398. #if (_WIN32_IE >= 0x0300)
  399. typedef struct _IMAGELISTDRAWPARAMS
  400. {
  401. DWORD cbSize;
  402. HIMAGELIST himl;
  403. int i;
  404. HDC hdcDst;
  405. int x;
  406. int y;
  407. int cx;
  408. int cy;
  409. int xBitmap; // x offest from the upperleft of bitmap
  410. int yBitmap; // y offset from the upperleft of bitmap
  411. COLORREF rgbBk;
  412. COLORREF rgbFg;
  413. UINT fStyle;
  414. DWORD dwRop;
  415. #if (_WIN32_IE >= 0x501)
  416. DWORD fState;
  417. DWORD Frame;
  418. COLORREF crEffect;
  419. #endif
  420. } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
  421. #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
  422. #endif // _WIN32_IE >= 0x0300
  423. #endif
  424. #define ILC_MASK 0x00000001
  425. #define ILC_COLOR 0x00000000
  426. #define ILC_COLORDDB 0x000000FE
  427. #define ILC_COLOR4 0x00000004
  428. #define ILC_COLOR8 0x00000008
  429. #define ILC_COLOR16 0x00000010
  430. #define ILC_COLOR24 0x00000018
  431. #define ILC_COLOR32 0x00000020
  432. #define ILC_PALETTE 0x00000800 // (not implemented)
  433. #if (_WIN32_WINNT >= 0x501)
  434. #define ILC_MIRROR 0x00002000 // Mirror the icons contained, if the process is mirrored
  435. #define ILC_PERITEMMIRROR 0x00008000 // Causes the mirroring code to mirror each item when inserting a set of images, verses the whole strip
  436. #endif
  437. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Create(int cx, int cy, UINT flags, int cInitial, int cGrow);
  438. WINCOMMCTRLAPI BOOL WINAPI ImageList_Destroy(HIMAGELIST himl);
  439. WINCOMMCTRLAPI int WINAPI ImageList_GetImageCount(HIMAGELIST himl);
  440. #if (_WIN32_IE >= 0x0300)
  441. WINCOMMCTRLAPI BOOL WINAPI ImageList_SetImageCount(HIMAGELIST himl, UINT uNewCount);
  442. #endif
  443. WINCOMMCTRLAPI int WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask);
  444. WINCOMMCTRLAPI int WINAPI ImageList_ReplaceIcon(HIMAGELIST himl, int i, HICON hicon);
  445. WINCOMMCTRLAPI COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk);
  446. WINCOMMCTRLAPI COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST himl);
  447. WINCOMMCTRLAPI BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST himl, int iImage, int iOverlay);
  448. #define ImageList_AddIcon(himl, hicon) ImageList_ReplaceIcon(himl, -1, hicon)
  449. #define ILD_NORMAL 0x00000000
  450. #define ILD_TRANSPARENT 0x00000001
  451. #define ILD_MASK 0x00000010
  452. #define ILD_IMAGE 0x00000020
  453. #if (_WIN32_IE >= 0x0300)
  454. #define ILD_ROP 0x00000040
  455. #endif
  456. #define ILD_BLEND25 0x00000002
  457. #define ILD_BLEND50 0x00000004
  458. #define ILD_OVERLAYMASK 0x00000F00
  459. #define INDEXTOOVERLAYMASK(i) ((i) << 8)
  460. #define ILD_PRESERVEALPHA 0x00001000 // This preserves the alpha channel in dest
  461. #define ILD_SCALE 0x00002000 // Causes the image to be scaled to cx, cy instead of clipped
  462. #define ILD_DPISCALE 0x00004000
  463. #define ILD_SELECTED ILD_BLEND50
  464. #define ILD_FOCUS ILD_BLEND25
  465. #define ILD_BLEND ILD_BLEND50
  466. #define CLR_HILIGHT CLR_DEFAULT
  467. #define ILS_NORMAL 0x00000000
  468. #define ILS_GLOW 0x00000001
  469. #define ILS_SHADOW 0x00000002
  470. #define ILS_SATURATE 0x00000004
  471. #define ILS_ALPHA 0x00000008
  472. WINCOMMCTRLAPI BOOL WINAPI ImageList_Draw(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, UINT fStyle);
  473. #ifdef _WIN32
  474. WINCOMMCTRLAPI BOOL WINAPI ImageList_Replace(HIMAGELIST himl, int i, HBITMAP hbmImage, HBITMAP hbmMask);
  475. WINCOMMCTRLAPI int WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hbmImage, COLORREF crMask);
  476. WINCOMMCTRLAPI BOOL WINAPI ImageList_DrawEx(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, int dx, int dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle);
  477. #if (_WIN32_IE >= 0x0300)
  478. WINCOMMCTRLAPI BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS* pimldp);
  479. #endif
  480. WINCOMMCTRLAPI BOOL WINAPI ImageList_Remove(HIMAGELIST himl, int i);
  481. WINCOMMCTRLAPI HICON WINAPI ImageList_GetIcon(HIMAGELIST himl, int i, UINT flags);
  482. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi, LPCSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags);
  483. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags);
  484. #ifdef UNICODE
  485. #define ImageList_LoadImage ImageList_LoadImageW
  486. #else
  487. #define ImageList_LoadImage ImageList_LoadImageA
  488. #endif
  489. #if (_WIN32_IE >= 0x0300)
  490. #define ILCF_MOVE (0x00000000)
  491. #define ILCF_SWAP (0x00000001)
  492. WINCOMMCTRLAPI BOOL WINAPI ImageList_Copy(HIMAGELIST himlDst, int iDst, HIMAGELIST himlSrc, int iSrc, UINT uFlags);
  493. #endif
  494. WINCOMMCTRLAPI BOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack, int iTrack, int dxHotspot, int dyHotspot);
  495. WINCOMMCTRLAPI void WINAPI ImageList_EndDrag();
  496. WINCOMMCTRLAPI BOOL WINAPI ImageList_DragEnter(HWND hwndLock, int x, int y);
  497. WINCOMMCTRLAPI BOOL WINAPI ImageList_DragLeave(HWND hwndLock);
  498. WINCOMMCTRLAPI BOOL WINAPI ImageList_DragMove(int x, int y);
  499. WINCOMMCTRLAPI BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST himlDrag, int iDrag, int dxHotspot, int dyHotspot);
  500. WINCOMMCTRLAPI BOOL WINAPI ImageList_DragShowNolock(BOOL fShow);
  501. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_GetDragImage(POINT *ppt,POINT *pptHotspot);
  502. #define ImageList_RemoveAll(himl) ImageList_Remove(himl, -1)
  503. #define ImageList_ExtractIcon(hi, himl, i) ImageList_GetIcon(himl, i, 0)
  504. #define ImageList_LoadBitmap(hi, lpbmp, cx, cGrow, crMask) ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0)
  505. #ifdef __IStream_INTERFACE_DEFINED__
  506. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Read(LPSTREAM pstm);
  507. WINCOMMCTRLAPI BOOL WINAPI ImageList_Write(HIMAGELIST himl, LPSTREAM pstm);
  508. #if (_WIN32_WINNT >= 0x0501)
  509. #define ILP_NORMAL 0 // Writes or reads the stream using new sematics for this version of comctl32
  510. #define ILP_DOWNLEVEL 1 // Write or reads the stream using downlevel sematics.
  511. WINCOMMCTRLAPI HRESULT WINAPI ImageList_ReadEx(DWORD dwFlags, LPSTREAM pstm, REFIID riid, PVOID* ppv);
  512. WINCOMMCTRLAPI HRESULT WINAPI ImageList_WriteEx(HIMAGELIST himl, DWORD dwFlags, LPSTREAM pstm);
  513. #endif
  514. #endif
  515. #ifndef IMAGEINFO
  516. typedef struct _IMAGEINFO
  517. {
  518. HBITMAP hbmImage;
  519. HBITMAP hbmMask;
  520. int Unused1;
  521. int Unused2;
  522. RECT rcImage;
  523. } IMAGEINFO, *LPIMAGEINFO;
  524. #endif
  525. WINCOMMCTRLAPI BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, int *cx, int *cy);
  526. WINCOMMCTRLAPI BOOL WINAPI ImageList_SetIconSize(HIMAGELIST himl, int cx, int cy);
  527. WINCOMMCTRLAPI BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST himl, int i, IMAGEINFO *pImageInfo);
  528. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1, int i1, HIMAGELIST himl2, int i2, int dx, int dy);
  529. #if (_WIN32_IE >= 0x0400)
  530. WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himl);
  531. #endif
  532. #endif
  533. #endif
  534. //====== HEADER CONTROL =======================================================
  535. #ifndef NOHEADER
  536. #ifdef _WIN32
  537. #define WC_HEADERA "SysHeader32"
  538. #define WC_HEADERW L"SysHeader32"
  539. #ifdef UNICODE
  540. #define WC_HEADER WC_HEADERW
  541. #else
  542. #define WC_HEADER WC_HEADERA
  543. #endif
  544. #else
  545. #define WC_HEADER "SysHeader"
  546. #endif
  547. // begin_r_commctrl
  548. #define HDS_HORZ 0x0000
  549. #define HDS_BUTTONS 0x0002
  550. #if (_WIN32_IE >= 0x0300)
  551. #define HDS_HOTTRACK 0x0004
  552. #endif
  553. #define HDS_HIDDEN 0x0008
  554. #if (_WIN32_IE >= 0x0300)
  555. #define HDS_DRAGDROP 0x0040
  556. #define HDS_FULLDRAG 0x0080
  557. #endif
  558. #if (_WIN32_IE >= 0x0500)
  559. #define HDS_FILTERBAR 0x0100
  560. #endif
  561. #if (_WIN32_WINNT >= 0x501)
  562. #define HDS_FLAT 0x0200
  563. #endif
  564. // end_r_commctrl
  565. #if (_WIN32_IE >= 0x0500)
  566. #define HDFT_ISSTRING 0x0000 // HD_ITEM.pvFilter points to a HD_TEXTFILTER
  567. #define HDFT_ISNUMBER 0x0001 // HD_ITEM.pvFilter points to a INT
  568. #define HDFT_HASNOVALUE 0x8000 // clear the filter, by setting this bit
  569. #ifdef UNICODE
  570. #define HD_TEXTFILTER HD_TEXTFILTERW
  571. #define HDTEXTFILTER HD_TEXTFILTERW
  572. #define LPHD_TEXTFILTER LPHD_TEXTFILTERW
  573. #define LPHDTEXTFILTER LPHD_TEXTFILTERW
  574. #else
  575. #define HD_TEXTFILTER HD_TEXTFILTERA
  576. #define HDTEXTFILTER HD_TEXTFILTERA
  577. #define LPHD_TEXTFILTER LPHD_TEXTFILTERA
  578. #define LPHDTEXTFILTER LPHD_TEXTFILTERA
  579. #endif
  580. typedef struct _HD_TEXTFILTERA
  581. {
  582. LPSTR pszText; // [in] pointer to the buffer containing the filter (ANSI)
  583. INT cchTextMax; // [in] max size of buffer/edit control buffer
  584. } HD_TEXTFILTERA, *LPHD_TEXTFILTERA;
  585. typedef struct _HD_TEXTFILTERW
  586. {
  587. LPWSTR pszText; // [in] pointer to the buffer contiaining the filter (UNICODE)
  588. INT cchTextMax; // [in] max size of buffer/edit control buffer
  589. } HD_TEXTFILTERW, *LPHD_TEXTFILTERW;
  590. #endif // _WIN32_IE >= 0x0500
  591. #if (_WIN32_IE >= 0x0300)
  592. #define HD_ITEMA HDITEMA
  593. #define HD_ITEMW HDITEMW
  594. #else
  595. #define HDITEMW HD_ITEMW
  596. #define HDITEMA HD_ITEMA
  597. #endif
  598. #define HD_ITEM HDITEM
  599. typedef struct _HD_ITEMA
  600. {
  601. UINT mask;
  602. int cxy;
  603. LPSTR pszText;
  604. HBITMAP hbm;
  605. int cchTextMax;
  606. int fmt;
  607. LPARAM lParam;
  608. #if (_WIN32_IE >= 0x0300)
  609. int iImage; // index of bitmap in ImageList
  610. int iOrder; // where to draw this item
  611. #endif
  612. #if (_WIN32_IE >= 0x0500)
  613. UINT type; // [in] filter type (defined what pvFilter is a pointer to)
  614. void * pvFilter; // [in] fillter data see above
  615. #endif
  616. } HDITEMA, *LPHDITEMA;
  617. #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA, lParam)
  618. #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW, lParam)
  619. typedef struct _HD_ITEMW
  620. {
  621. UINT mask;
  622. int cxy;
  623. LPWSTR pszText;
  624. HBITMAP hbm;
  625. int cchTextMax;
  626. int fmt;
  627. LPARAM lParam;
  628. #if (_WIN32_IE >= 0x0300)
  629. int iImage; // index of bitmap in ImageList
  630. int iOrder;
  631. #endif
  632. #if (_WIN32_IE >= 0x0500)
  633. UINT type; // [in] filter type (defined what pvFilter is a pointer to)
  634. void * pvFilter; // [in] fillter data see above
  635. #endif
  636. } HDITEMW, *LPHDITEMW;
  637. #ifdef UNICODE
  638. #define HDITEM HDITEMW
  639. #define LPHDITEM LPHDITEMW
  640. #define HDITEM_V1_SIZE HDITEMW_V1_SIZE
  641. #else
  642. #define HDITEM HDITEMA
  643. #define LPHDITEM LPHDITEMA
  644. #define HDITEM_V1_SIZE HDITEMA_V1_SIZE
  645. #endif
  646. #define HDI_WIDTH 0x0001
  647. #define HDI_HEIGHT HDI_WIDTH
  648. #define HDI_TEXT 0x0002
  649. #define HDI_FORMAT 0x0004
  650. #define HDI_LPARAM 0x0008
  651. #define HDI_BITMAP 0x0010
  652. #if (_WIN32_IE >= 0x0300)
  653. #define HDI_IMAGE 0x0020
  654. #define HDI_DI_SETITEM 0x0040
  655. #define HDI_ORDER 0x0080
  656. #endif
  657. #if (_WIN32_IE >= 0x0500)
  658. #define HDI_FILTER 0x0100
  659. #endif
  660. #define HDF_LEFT 0x0000
  661. #define HDF_RIGHT 0x0001
  662. #define HDF_CENTER 0x0002
  663. #define HDF_JUSTIFYMASK 0x0003
  664. #define HDF_RTLREADING 0x0004
  665. #define HDF_OWNERDRAW 0x8000
  666. #define HDF_STRING 0x4000
  667. #define HDF_BITMAP 0x2000
  668. #if (_WIN32_IE >= 0x0300)
  669. #define HDF_BITMAP_ON_RIGHT 0x1000
  670. #define HDF_IMAGE 0x0800
  671. #endif
  672. #if (_WIN32_WINNT >= 0x501)
  673. #define HDF_SORTUP 0x0400
  674. #define HDF_SORTDOWN 0x0200
  675. #endif
  676. #define HDM_GETITEMCOUNT (HDM_FIRST + 0)
  677. #define Header_GetItemCount(hwndHD) \
  678. (int)SNDMSG((hwndHD), HDM_GETITEMCOUNT, 0, 0L)
  679. #define HDM_INSERTITEMA (HDM_FIRST + 1)
  680. #define HDM_INSERTITEMW (HDM_FIRST + 10)
  681. #ifdef UNICODE
  682. #define HDM_INSERTITEM HDM_INSERTITEMW
  683. #else
  684. #define HDM_INSERTITEM HDM_INSERTITEMA
  685. #endif
  686. #define Header_InsertItem(hwndHD, i, phdi) \
  687. (int)SNDMSG((hwndHD), HDM_INSERTITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))
  688. #define HDM_DELETEITEM (HDM_FIRST + 2)
  689. #define Header_DeleteItem(hwndHD, i) \
  690. (BOOL)SNDMSG((hwndHD), HDM_DELETEITEM, (WPARAM)(int)(i), 0L)
  691. #define HDM_GETITEMA (HDM_FIRST + 3)
  692. #define HDM_GETITEMW (HDM_FIRST + 11)
  693. #ifdef UNICODE
  694. #define HDM_GETITEM HDM_GETITEMW
  695. #else
  696. #define HDM_GETITEM HDM_GETITEMA
  697. #endif
  698. #define Header_GetItem(hwndHD, i, phdi) \
  699. (BOOL)SNDMSG((hwndHD), HDM_GETITEM, (WPARAM)(int)(i), (LPARAM)(HD_ITEM *)(phdi))
  700. #define HDM_SETITEMA (HDM_FIRST + 4)
  701. #define HDM_SETITEMW (HDM_FIRST + 12)
  702. #ifdef UNICODE
  703. #define HDM_SETITEM HDM_SETITEMW
  704. #else
  705. #define HDM_SETITEM HDM_SETITEMA
  706. #endif
  707. #define Header_SetItem(hwndHD, i, phdi) \
  708. (BOOL)SNDMSG((hwndHD), HDM_SETITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))
  709. #if (_WIN32_IE >= 0x0300)
  710. #define HD_LAYOUT HDLAYOUT
  711. #else
  712. #define HDLAYOUT HD_LAYOUT
  713. #endif
  714. typedef struct _HD_LAYOUT
  715. {
  716. RECT *prc;
  717. WINDOWPOS *pwpos;
  718. } HDLAYOUT, *LPHDLAYOUT;
  719. #define HDM_LAYOUT (HDM_FIRST + 5)
  720. #define Header_Layout(hwndHD, playout) \
  721. (BOOL)SNDMSG((hwndHD), HDM_LAYOUT, 0, (LPARAM)(HD_LAYOUT *)(playout))
  722. #define HHT_NOWHERE 0x0001
  723. #define HHT_ONHEADER 0x0002
  724. #define HHT_ONDIVIDER 0x0004
  725. #define HHT_ONDIVOPEN 0x0008
  726. #if (_WIN32_IE >= 0x0500)
  727. #define HHT_ONFILTER 0x0010
  728. #define HHT_ONFILTERBUTTON 0x0020
  729. #endif
  730. #define HHT_ABOVE 0x0100
  731. #define HHT_BELOW 0x0200
  732. #define HHT_TORIGHT 0x0400
  733. #define HHT_TOLEFT 0x0800
  734. #if (_WIN32_IE >= 0x0300)
  735. #define HD_HITTESTINFO HDHITTESTINFO
  736. #else
  737. #define HDHITTESTINFO HD_HITTESTINFO
  738. #endif
  739. typedef struct _HD_HITTESTINFO
  740. {
  741. POINT pt;
  742. UINT flags;
  743. int iItem;
  744. } HDHITTESTINFO, *LPHDHITTESTINFO;
  745. #define HDM_HITTEST (HDM_FIRST + 6)
  746. #if (_WIN32_IE >= 0x0300)
  747. #define HDM_GETITEMRECT (HDM_FIRST + 7)
  748. #define Header_GetItemRect(hwnd, iItem, lprc) \
  749. (BOOL)SNDMSG((hwnd), HDM_GETITEMRECT, (WPARAM)(iItem), (LPARAM)(lprc))
  750. #define HDM_SETIMAGELIST (HDM_FIRST + 8)
  751. #define Header_SetImageList(hwnd, himl) \
  752. (HIMAGELIST)SNDMSG((hwnd), HDM_SETIMAGELIST, 0, (LPARAM)(himl))
  753. #define HDM_GETIMAGELIST (HDM_FIRST + 9)
  754. #define Header_GetImageList(hwnd) \
  755. (HIMAGELIST)SNDMSG((hwnd), HDM_GETIMAGELIST, 0, 0)
  756. #define HDM_ORDERTOINDEX (HDM_FIRST + 15)
  757. #define Header_OrderToIndex(hwnd, i) \
  758. (int)SNDMSG((hwnd), HDM_ORDERTOINDEX, (WPARAM)(i), 0)
  759. #define HDM_CREATEDRAGIMAGE (HDM_FIRST + 16) // wparam = which item (by index)
  760. #define Header_CreateDragImage(hwnd, i) \
  761. (HIMAGELIST)SNDMSG((hwnd), HDM_CREATEDRAGIMAGE, (WPARAM)(i), 0)
  762. #define HDM_GETORDERARRAY (HDM_FIRST + 17)
  763. #define Header_GetOrderArray(hwnd, iCount, lpi) \
  764. (BOOL)SNDMSG((hwnd), HDM_GETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))
  765. #define HDM_SETORDERARRAY (HDM_FIRST + 18)
  766. #define Header_SetOrderArray(hwnd, iCount, lpi) \
  767. (BOOL)SNDMSG((hwnd), HDM_SETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))
  768. // lparam = int array of size HDM_GETITEMCOUNT
  769. // the array specifies the order that all items should be displayed.
  770. // e.g. { 2, 0, 1}
  771. // says the index 2 item should be shown in the 0ths position
  772. // index 0 should be shown in the 1st position
  773. // index 1 should be shown in the 2nd position
  774. #define HDM_SETHOTDIVIDER (HDM_FIRST + 19)
  775. #define Header_SetHotDivider(hwnd, fPos, dw) \
  776. (int)SNDMSG((hwnd), HDM_SETHOTDIVIDER, (WPARAM)(fPos), (LPARAM)(dw))
  777. // convenience message for external dragdrop
  778. // wParam = BOOL specifying whether the lParam is a dwPos of the cursor
  779. // position or the index of which divider to hotlight
  780. // lParam = depends on wParam (-1 and wParm = FALSE turns off hotlight)
  781. #endif // _WIN32_IE >= 0x0300
  782. #if (_WIN32_IE >= 0x0500)
  783. #define HDM_SETBITMAPMARGIN (HDM_FIRST + 20)
  784. #define Header_SetBitmapMargin(hwnd, iWidth) \
  785. (int)SNDMSG((hwnd), HDM_SETBITMAPMARGIN, (WPARAM)(iWidth), 0)
  786. #define HDM_GETBITMAPMARGIN (HDM_FIRST + 21)
  787. #define Header_GetBitmapMargin(hwnd) \
  788. (int)SNDMSG((hwnd), HDM_GETBITMAPMARGIN, 0, 0)
  789. #endif
  790. #if (_WIN32_IE >= 0x0400)
  791. #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  792. #define Header_SetUnicodeFormat(hwnd, fUnicode) \
  793. (BOOL)SNDMSG((hwnd), HDM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
  794. #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  795. #define Header_GetUnicodeFormat(hwnd) \
  796. (BOOL)SNDMSG((hwnd), HDM_GETUNICODEFORMAT, 0, 0)
  797. #endif
  798. #if (_WIN32_IE >= 0x0500)
  799. #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
  800. #define Header_SetFilterChangeTimeout(hwnd, i) \
  801. (int)SNDMSG((hwnd), HDM_SETFILTERCHANGETIMEOUT, 0, (LPARAM)(i))
  802. #define HDM_EDITFILTER (HDM_FIRST+23)
  803. #define Header_EditFilter(hwnd, i, fDiscardChanges) \
  804. (int)SNDMSG((hwnd), HDM_EDITFILTER, (WPARAM)(i), MAKELPARAM(fDiscardChanges, 0))
  805. // Clear filter takes -1 as a column value to indicate that all
  806. // the filter should be cleared. When this happens you will
  807. // only receive a single filter changed notification.
  808. #define HDM_CLEARFILTER (HDM_FIRST+24)
  809. #define Header_ClearFilter(hwnd, i) \
  810. (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)(i), 0)
  811. #define Header_ClearAllFilters(hwnd) \
  812. (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)-1, 0)
  813. #endif
  814. #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
  815. #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
  816. #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
  817. #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
  818. #define HDN_ITEMCLICKA (HDN_FIRST-2)
  819. #define HDN_ITEMCLICKW (HDN_FIRST-22)
  820. #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
  821. #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
  822. #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
  823. #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
  824. #define HDN_BEGINTRACKA (HDN_FIRST-6)
  825. #define HDN_BEGINTRACKW (HDN_FIRST-26)
  826. #define HDN_ENDTRACKA (HDN_FIRST-7)
  827. #define HDN_ENDTRACKW (HDN_FIRST-27)
  828. #define HDN_TRACKA (HDN_FIRST-8)
  829. #define HDN_TRACKW (HDN_FIRST-28)
  830. #if (_WIN32_IE >= 0x0300)
  831. #define HDN_GETDISPINFOA (HDN_FIRST-9)
  832. #define HDN_GETDISPINFOW (HDN_FIRST-29)
  833. #define HDN_BEGINDRAG (HDN_FIRST-10)
  834. #define HDN_ENDDRAG (HDN_FIRST-11)
  835. #endif
  836. #if (_WIN32_IE >= 0x0500)
  837. #define HDN_FILTERCHANGE (HDN_FIRST-12)
  838. #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
  839. #endif
  840. #ifdef UNICODE
  841. #define HDN_ITEMCHANGING HDN_ITEMCHANGINGW
  842. #define HDN_ITEMCHANGED HDN_ITEMCHANGEDW
  843. #define HDN_ITEMCLICK HDN_ITEMCLICKW
  844. #define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKW
  845. #define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKW
  846. #define HDN_BEGINTRACK HDN_BEGINTRACKW
  847. #define HDN_ENDTRACK HDN_ENDTRACKW
  848. #define HDN_TRACK HDN_TRACKW
  849. #if (_WIN32_IE >= 0x0300)
  850. #define HDN_GETDISPINFO HDN_GETDISPINFOW
  851. #endif
  852. #else
  853. #define HDN_ITEMCHANGING HDN_ITEMCHANGINGA
  854. #define HDN_ITEMCHANGED HDN_ITEMCHANGEDA
  855. #define HDN_ITEMCLICK HDN_ITEMCLICKA
  856. #define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKA
  857. #define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKA
  858. #define HDN_BEGINTRACK HDN_BEGINTRACKA
  859. #define HDN_ENDTRACK HDN_ENDTRACKA
  860. #define HDN_TRACK HDN_TRACKA
  861. #if (_WIN32_IE >= 0x0300)
  862. #define HDN_GETDISPINFO HDN_GETDISPINFOA
  863. #endif
  864. #endif
  865. #if (_WIN32_IE >= 0x0300)
  866. #define HD_NOTIFYA NMHEADERA
  867. #define HD_NOTIFYW NMHEADERW
  868. #else
  869. #define tagNMHEADERA _HD_NOTIFY
  870. #define NMHEADERA HD_NOTIFYA
  871. #define tagHMHEADERW _HD_NOTIFYW
  872. #define NMHEADERW HD_NOTIFYW
  873. #endif
  874. #define HD_NOTIFY NMHEADER
  875. typedef struct tagNMHEADERA
  876. {
  877. NMHDR hdr;
  878. int iItem;
  879. int iButton;
  880. HDITEMA *pitem;
  881. } NMHEADERA, *LPNMHEADERA;
  882. typedef struct tagNMHEADERW
  883. {
  884. NMHDR hdr;
  885. int iItem;
  886. int iButton;
  887. HDITEMW *pitem;
  888. } NMHEADERW, *LPNMHEADERW;
  889. #ifdef UNICODE
  890. #define NMHEADER NMHEADERW
  891. #define LPNMHEADER LPNMHEADERW
  892. #else
  893. #define NMHEADER NMHEADERA
  894. #define LPNMHEADER LPNMHEADERA
  895. #endif
  896. typedef struct tagNMHDDISPINFOW
  897. {
  898. NMHDR hdr;
  899. int iItem;
  900. UINT mask;
  901. LPWSTR pszText;
  902. int cchTextMax;
  903. int iImage;
  904. LPARAM lParam;
  905. } NMHDDISPINFOW, *LPNMHDDISPINFOW;
  906. typedef struct tagNMHDDISPINFOA
  907. {
  908. NMHDR hdr;
  909. int iItem;
  910. UINT mask;
  911. LPSTR pszText;
  912. int cchTextMax;
  913. int iImage;
  914. LPARAM lParam;
  915. } NMHDDISPINFOA, *LPNMHDDISPINFOA;
  916. #ifdef UNICODE
  917. #define NMHDDISPINFO NMHDDISPINFOW
  918. #define LPNMHDDISPINFO LPNMHDDISPINFOW
  919. #else
  920. #define NMHDDISPINFO NMHDDISPINFOA
  921. #define LPNMHDDISPINFO LPNMHDDISPINFOA
  922. #endif
  923. #if (_WIN32_IE >= 0x0500)
  924. typedef struct tagNMHDFILTERBTNCLICK
  925. {
  926. NMHDR hdr;
  927. INT iItem;
  928. RECT rc;
  929. } NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;
  930. #endif
  931. #endif // NOHEADER
  932. //====== TOOLBAR CONTROL ======================================================
  933. #ifndef NOTOOLBAR
  934. #ifdef _WIN32
  935. #define TOOLBARCLASSNAMEW L"ToolbarWindow32"
  936. #define TOOLBARCLASSNAMEA "ToolbarWindow32"
  937. #ifdef UNICODE
  938. #define TOOLBARCLASSNAME TOOLBARCLASSNAMEW
  939. #else
  940. #define TOOLBARCLASSNAME TOOLBARCLASSNAMEA
  941. #endif
  942. #else
  943. #define TOOLBARCLASSNAME "ToolbarWindow"
  944. #endif
  945. typedef struct _TBBUTTON {
  946. int iBitmap;
  947. int idCommand;
  948. BYTE fsState;
  949. BYTE fsStyle;
  950. #ifdef _WIN64
  951. BYTE bReserved[6]; // padding for alignment
  952. #elif defined(_WIN32)
  953. BYTE bReserved[2]; // padding for alignment
  954. #endif
  955. DWORD_PTR dwData;
  956. INT_PTR iString;
  957. } TBBUTTON, NEAR* PTBBUTTON, *LPTBBUTTON;
  958. typedef const TBBUTTON *LPCTBBUTTON;
  959. typedef struct _COLORMAP {
  960. COLORREF from;
  961. COLORREF to;
  962. } COLORMAP, *LPCOLORMAP;
  963. WINCOMMCTRLAPI HWND WINAPI CreateToolbarEx(HWND hwnd, DWORD ws, UINT wID, int nBitmaps,
  964. HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons,
  965. int iNumButtons, int dxButton, int dyButton,
  966. int dxBitmap, int dyBitmap, UINT uStructSize);
  967. WINCOMMCTRLAPI HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance, INT_PTR idBitmap,
  968. UINT wFlags, LPCOLORMAP lpColorMap,
  969. int iNumMaps);
  970. #define CMB_MASKED 0x02
  971. #define TBSTATE_CHECKED 0x01
  972. #define TBSTATE_PRESSED 0x02
  973. #define TBSTATE_ENABLED 0x04
  974. #define TBSTATE_HIDDEN 0x08
  975. #define TBSTATE_INDETERMINATE 0x10
  976. #define TBSTATE_WRAP 0x20
  977. #if (_WIN32_IE >= 0x0300)
  978. #define TBSTATE_ELLIPSES 0x40
  979. #endif
  980. #if (_WIN32_IE >= 0x0400)
  981. #define TBSTATE_MARKED 0x80
  982. #endif
  983. #define TBSTYLE_BUTTON 0x0000 // obsolete; use BTNS_BUTTON instead
  984. #define TBSTYLE_SEP 0x0001 // obsolete; use BTNS_SEP instead
  985. #define TBSTYLE_CHECK 0x0002 // obsolete; use BTNS_CHECK instead
  986. #define TBSTYLE_GROUP 0x0004 // obsolete; use BTNS_GROUP instead
  987. #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK) // obsolete; use BTNS_CHECKGROUP instead
  988. #if (_WIN32_IE >= 0x0300)
  989. #define TBSTYLE_DROPDOWN 0x0008 // obsolete; use BTNS_DROPDOWN instead
  990. #endif
  991. #if (_WIN32_IE >= 0x0400)
  992. #define TBSTYLE_AUTOSIZE 0x0010 // obsolete; use BTNS_AUTOSIZE instead
  993. #define TBSTYLE_NOPREFIX 0x0020 // obsolete; use BTNS_NOPREFIX instead
  994. #endif
  995. #define TBSTYLE_TOOLTIPS 0x0100
  996. #define TBSTYLE_WRAPABLE 0x0200
  997. #define TBSTYLE_ALTDRAG 0x0400
  998. #if (_WIN32_IE >= 0x0300)
  999. #define TBSTYLE_FLAT 0x0800
  1000. #define TBSTYLE_LIST 0x1000
  1001. #define TBSTYLE_CUSTOMERASE 0x2000
  1002. #endif
  1003. #if (_WIN32_IE >= 0x0400)
  1004. #define TBSTYLE_REGISTERDROP 0x4000
  1005. #define TBSTYLE_TRANSPARENT 0x8000
  1006. #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
  1007. #endif
  1008. #if (_WIN32_IE >= 0x0500)
  1009. #define BTNS_BUTTON TBSTYLE_BUTTON // 0x0000
  1010. #define BTNS_SEP TBSTYLE_SEP // 0x0001
  1011. #define BTNS_CHECK TBSTYLE_CHECK // 0x0002
  1012. #define BTNS_GROUP TBSTYLE_GROUP // 0x0004
  1013. #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP // (TBSTYLE_GROUP | TBSTYLE_CHECK)
  1014. #define BTNS_DROPDOWN TBSTYLE_DROPDOWN // 0x0008
  1015. #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE // 0x0010; automatically calculate the cx of the button
  1016. #define BTNS_NOPREFIX TBSTYLE_NOPREFIX // 0x0020; this button should not have accel prefix
  1017. #if (_WIN32_IE >= 0x0501)
  1018. #define BTNS_SHOWTEXT 0x0040 // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set
  1019. #endif // 0x0501
  1020. #define BTNS_WHOLEDROPDOWN 0x0080 // draw drop-down arrow, but without split arrow section
  1021. #endif
  1022. #if (_WIN32_IE >= 0x0501)
  1023. #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
  1024. #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 // don't show partially obscured buttons
  1025. #endif // 0x0501
  1026. #if (_WIN32_WINNT >= 0x501)
  1027. #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 // Double Buffer the toolbar
  1028. #endif
  1029. #if (_WIN32_IE >= 0x0400)
  1030. // Custom Draw Structure
  1031. typedef struct _NMTBCUSTOMDRAW {
  1032. NMCUSTOMDRAW nmcd;
  1033. HBRUSH hbrMonoDither;
  1034. HBRUSH hbrLines; // For drawing lines on buttons
  1035. HPEN hpenLines; // For drawing lines on buttons
  1036. COLORREF clrText; // Color of text
  1037. COLORREF clrMark; // Color of text bk when marked. (only if TBSTATE_MARKED)
  1038. COLORREF clrTextHighlight; // Color of text when highlighted
  1039. COLORREF clrBtnFace; // Background of the button
  1040. COLORREF clrBtnHighlight; // 3D highlight
  1041. COLORREF clrHighlightHotTrack; // In conjunction with fHighlightHotTrack
  1042. // will cause button to highlight like a menu
  1043. RECT rcText; // Rect for text
  1044. int nStringBkMode;
  1045. int nHLStringBkMode;
  1046. #if (_WIN32_WINNT >= 0x501)
  1047. int iListGap;
  1048. #endif
  1049. } NMTBCUSTOMDRAW, * LPNMTBCUSTOMDRAW;
  1050. // Toolbar custom draw return flags
  1051. #define TBCDRF_NOEDGES 0x00010000 // Don't draw button edges
  1052. #define TBCDRF_HILITEHOTTRACK 0x00020000 // Use color of the button bk when hottracked
  1053. #define TBCDRF_NOOFFSET 0x00040000 // Don't offset button if pressed
  1054. #define TBCDRF_NOMARK 0x00080000 // Don't draw default highlight of image/text for TBSTATE_MARKED
  1055. #define TBCDRF_NOETCHEDEFFECT 0x00100000 // Don't draw etched effect for disabled items
  1056. #endif
  1057. #if (_WIN32_IE >= 0x0500)
  1058. #define TBCDRF_BLENDICON 0x00200000 // Use ILD_BLEND50 on the icon image
  1059. #define TBCDRF_NOBACKGROUND 0x00400000 // Use ILD_BLEND50 on the icon image
  1060. #endif
  1061. #define TB_ENABLEBUTTON (WM_USER + 1)
  1062. #define TB_CHECKBUTTON (WM_USER + 2)
  1063. #define TB_PRESSBUTTON (WM_USER + 3)
  1064. #define TB_HIDEBUTTON (WM_USER + 4)
  1065. #define TB_INDETERMINATE (WM_USER + 5)
  1066. #if (_WIN32_IE >= 0x0400)
  1067. #define TB_MARKBUTTON (WM_USER + 6)
  1068. #endif
  1069. #define TB_ISBUTTONENABLED (WM_USER + 9)
  1070. #define TB_ISBUTTONCHECKED (WM_USER + 10)
  1071. #define TB_ISBUTTONPRESSED (WM_USER + 11)
  1072. #define TB_ISBUTTONHIDDEN (WM_USER + 12)
  1073. #define TB_ISBUTTONINDETERMINATE (WM_USER + 13)
  1074. #if (_WIN32_IE >= 0x0400)
  1075. #define TB_ISBUTTONHIGHLIGHTED (WM_USER + 14)
  1076. #endif
  1077. #define TB_SETSTATE (WM_USER + 17)
  1078. #define TB_GETSTATE (WM_USER + 18)
  1079. #define TB_ADDBITMAP (WM_USER + 19)
  1080. #ifdef _WIN32
  1081. typedef struct tagTBADDBITMAP {
  1082. HINSTANCE hInst;
  1083. UINT_PTR nID;
  1084. } TBADDBITMAP, *LPTBADDBITMAP;
  1085. #define HINST_COMMCTRL ((HINSTANCE)-1)
  1086. #define IDB_STD_SMALL_COLOR 0
  1087. #define IDB_STD_LARGE_COLOR 1
  1088. #define IDB_VIEW_SMALL_COLOR 4
  1089. #define IDB_VIEW_LARGE_COLOR 5
  1090. #if (_WIN32_IE >= 0x0300)
  1091. #define IDB_HIST_SMALL_COLOR 8
  1092. #define IDB_HIST_LARGE_COLOR 9
  1093. #endif
  1094. // icon indexes for standard bitmap
  1095. #define STD_CUT 0
  1096. #define STD_COPY 1
  1097. #define STD_PASTE 2
  1098. #define STD_UNDO 3
  1099. #define STD_REDOW 4
  1100. #define STD_DELETE 5
  1101. #define STD_FILENEW 6
  1102. #define STD_FILEOPEN 7
  1103. #define STD_FILESAVE 8
  1104. #define STD_PRINTPRE 9
  1105. #define STD_PROPERTIES 10
  1106. #define STD_HELP 11
  1107. #define STD_FIND 12
  1108. #define STD_REPLACE 13
  1109. #define STD_PRINT 14
  1110. // icon indexes for standard view bitmap
  1111. #define VIEW_LARGEICONS 0
  1112. #define VIEW_SMALLICONS 1
  1113. #define VIEW_LIST 2
  1114. #define VIEW_DETAILS 3
  1115. #define VIEW_SORTNAME 4
  1116. #define VIEW_SORTSIZE 5
  1117. #define VIEW_SORTDATE 6
  1118. #define VIEW_SORTTYPE 7
  1119. #define VIEW_PARENTFOLDER 8
  1120. #define VIEW_NETCONNECT 9
  1121. #define VIEW_NETDISCONNECT 10
  1122. #define VIEW_NEWFOLDER 11
  1123. #if (_WIN32_IE >= 0x0400)
  1124. #define VIEW_VIEWMENU 12
  1125. #endif
  1126. #if (_WIN32_IE >= 0x0300)
  1127. #define HIST_BACK 0
  1128. #define HIST_FORWARD 1
  1129. #define HIST_FAVORITES 2
  1130. #define HIST_ADDTOFAVORITES 3
  1131. #define HIST_VIEWTREE 4
  1132. #endif
  1133. #endif
  1134. #if (_WIN32_IE >= 0x0400)
  1135. #define TB_ADDBUTTONSA (WM_USER + 20)
  1136. #define TB_INSERTBUTTONA (WM_USER + 21)
  1137. #else
  1138. #define TB_ADDBUTTONS (WM_USER + 20)
  1139. #define TB_INSERTBUTTON (WM_USER + 21)
  1140. #endif
  1141. #define TB_DELETEBUTTON (WM_USER + 22)
  1142. #define TB_GETBUTTON (WM_USER + 23)
  1143. #define TB_BUTTONCOUNT (WM_USER + 24)
  1144. #define TB_COMMANDTOINDEX (WM_USER + 25)
  1145. #ifdef _WIN32
  1146. typedef struct tagTBSAVEPARAMSA {
  1147. HKEY hkr;
  1148. LPCSTR pszSubKey;
  1149. LPCSTR pszValueName;
  1150. } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
  1151. typedef struct tagTBSAVEPARAMSW {
  1152. HKEY hkr;
  1153. LPCWSTR pszSubKey;
  1154. LPCWSTR pszValueName;
  1155. } TBSAVEPARAMSW, *LPTBSAVEPARAMW;
  1156. #ifdef UNICODE
  1157. #define TBSAVEPARAMS TBSAVEPARAMSW
  1158. #define LPTBSAVEPARAMS LPTBSAVEPARAMSW
  1159. #else
  1160. #define TBSAVEPARAMS TBSAVEPARAMSA
  1161. #define LPTBSAVEPARAMS LPTBSAVEPARAMSA
  1162. #endif
  1163. #endif // _WIN32
  1164. #define TB_SAVERESTOREA (WM_USER + 26)
  1165. #define TB_SAVERESTOREW (WM_USER + 76)
  1166. #define TB_CUSTOMIZE (WM_USER + 27)
  1167. #define TB_ADDSTRINGA (WM_USER + 28)
  1168. #define TB_ADDSTRINGW (WM_USER + 77)
  1169. #define TB_GETITEMRECT (WM_USER + 29)
  1170. #define TB_BUTTONSTRUCTSIZE (WM_USER + 30)
  1171. #define TB_SETBUTTONSIZE (WM_USER + 31)
  1172. #define TB_SETBITMAPSIZE (WM_USER + 32)
  1173. #define TB_AUTOSIZE (WM_USER + 33)
  1174. #define TB_GETTOOLTIPS (WM_USER + 35)
  1175. #define TB_SETTOOLTIPS (WM_USER + 36)
  1176. #define TB_SETPARENT (WM_USER + 37)
  1177. #define TB_SETROWS (WM_USER + 39)
  1178. #define TB_GETROWS (WM_USER + 40)
  1179. #define TB_SETCMDID (WM_USER + 42)
  1180. #define TB_CHANGEBITMAP (WM_USER + 43)
  1181. #define TB_GETBITMAP (WM_USER + 44)
  1182. #define TB_GETBUTTONTEXTA (WM_USER + 45)
  1183. #define TB_GETBUTTONTEXTW (WM_USER + 75)
  1184. #define TB_REPLACEBITMAP (WM_USER + 46)
  1185. #if (_WIN32_IE >= 0x0300)
  1186. #define TB_SETINDENT (WM_USER + 47)
  1187. #define TB_SETIMAGELIST (WM_USER + 48)
  1188. #define TB_GETIMAGELIST (WM_USER + 49)
  1189. #define TB_LOADIMAGES (WM_USER + 50)
  1190. #define TB_GETRECT (WM_USER + 51) // wParam is the Cmd instead of index
  1191. #define TB_SETHOTIMAGELIST (WM_USER + 52)
  1192. #define TB_GETHOTIMAGELIST (WM_USER + 53)
  1193. #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
  1194. #define TB_GETDISABLEDIMAGELIST (WM_USER + 55)
  1195. #define TB_SETSTYLE (WM_USER + 56)
  1196. #define TB_GETSTYLE (WM_USER + 57)
  1197. #define TB_GETBUTTONSIZE (WM_USER + 58)
  1198. #define TB_SETBUTTONWIDTH (WM_USER + 59)
  1199. #define TB_SETMAXTEXTROWS (WM_USER + 60)
  1200. #define TB_GETTEXTROWS (WM_USER + 61)
  1201. #endif // _WIN32_IE >= 0x0300
  1202. #ifdef UNICODE
  1203. #define TB_GETBUTTONTEXT TB_GETBUTTONTEXTW
  1204. #define TB_SAVERESTORE TB_SAVERESTOREW
  1205. #define TB_ADDSTRING TB_ADDSTRINGW
  1206. #else
  1207. #define TB_GETBUTTONTEXT TB_GETBUTTONTEXTA
  1208. #define TB_SAVERESTORE TB_SAVERESTOREA
  1209. #define TB_ADDSTRING TB_ADDSTRINGA
  1210. #endif
  1211. #if (_WIN32_IE >= 0x0400)
  1212. #define TB_GETOBJECT (WM_USER + 62) // wParam == IID, lParam void **ppv
  1213. #define TB_GETHOTITEM (WM_USER + 71)
  1214. #define TB_SETHOTITEM (WM_USER + 72) // wParam == iHotItem
  1215. #define TB_SETANCHORHIGHLIGHT (WM_USER + 73) // wParam == TRUE/FALSE
  1216. #define TB_GETANCHORHIGHLIGHT (WM_USER + 74)
  1217. #define TB_MAPACCELERATORA (WM_USER + 78) // wParam == ch, lParam int * pidBtn
  1218. typedef struct {
  1219. int iButton;
  1220. DWORD dwFlags;
  1221. } TBINSERTMARK, * LPTBINSERTMARK;
  1222. #define TBIMHT_AFTER 0x00000001 // TRUE = insert After iButton, otherwise before
  1223. #define TBIMHT_BACKGROUND 0x00000002 // TRUE iff missed buttons completely
  1224. #define TB_GETINSERTMARK (WM_USER + 79) // lParam == LPTBINSERTMARK
  1225. #define TB_SETINSERTMARK (WM_USER + 80) // lParam == LPTBINSERTMARK
  1226. #define TB_INSERTMARKHITTEST (WM_USER + 81) // wParam == LPPOINT lParam == LPTBINSERTMARK
  1227. #define TB_MOVEBUTTON (WM_USER + 82)
  1228. #define TB_GETMAXSIZE (WM_USER + 83) // lParam == LPSIZE
  1229. #define TB_SETEXTENDEDSTYLE (WM_USER + 84) // For TBSTYLE_EX_*
  1230. #define TB_GETEXTENDEDSTYLE (WM_USER + 85) // For TBSTYLE_EX_*
  1231. #define TB_GETPADDING (WM_USER + 86)
  1232. #define TB_SETPADDING (WM_USER + 87)
  1233. #define TB_SETINSERTMARKCOLOR (WM_USER + 88)
  1234. #define TB_GETINSERTMARKCOLOR (WM_USER + 89)
  1235. #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME // lParam is color scheme
  1236. #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME // fills in COLORSCHEME pointed to by lParam
  1237. #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  1238. #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  1239. #define TB_MAPACCELERATORW (WM_USER + 90) // wParam == ch, lParam int * pidBtn
  1240. #ifdef UNICODE
  1241. #define TB_MAPACCELERATOR TB_MAPACCELERATORW
  1242. #else
  1243. #define TB_MAPACCELERATOR TB_MAPACCELERATORA
  1244. #endif
  1245. #endif // _WIN32_IE >= 0x0400
  1246. typedef struct {
  1247. HINSTANCE hInstOld;
  1248. UINT_PTR nIDOld;
  1249. HINSTANCE hInstNew;
  1250. UINT_PTR nIDNew;
  1251. int nButtons;
  1252. } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
  1253. #ifdef _WIN32
  1254. #define TBBF_LARGE 0x0001
  1255. #define TB_GETBITMAPFLAGS (WM_USER + 41)
  1256. #if (_WIN32_IE >= 0x0400)
  1257. #define TBIF_IMAGE 0x00000001
  1258. #define TBIF_TEXT 0x00000002
  1259. #define TBIF_STATE 0x00000004
  1260. #define TBIF_STYLE 0x00000008
  1261. #define TBIF_LPARAM 0x00000010
  1262. #define TBIF_COMMAND 0x00000020
  1263. #define TBIF_SIZE 0x00000040
  1264. #if (_WIN32_IE >= 0x0500)
  1265. #define TBIF_BYINDEX 0x80000000 // this specifies that the wparam in Get/SetButtonInfo is an index, not id
  1266. #endif
  1267. typedef struct {
  1268. UINT cbSize;
  1269. DWORD dwMask;
  1270. int idCommand;
  1271. int iImage;
  1272. BYTE fsState;
  1273. BYTE fsStyle;
  1274. WORD cx;
  1275. DWORD_PTR lParam;
  1276. LPSTR pszText;
  1277. int cchText;
  1278. } TBBUTTONINFOA, *LPTBBUTTONINFOA;
  1279. typedef struct {
  1280. UINT cbSize;
  1281. DWORD dwMask;
  1282. int idCommand;
  1283. int iImage;
  1284. BYTE fsState;
  1285. BYTE fsStyle;
  1286. WORD cx;
  1287. DWORD_PTR lParam;
  1288. LPWSTR pszText;
  1289. int cchText;
  1290. } TBBUTTONINFOW, *LPTBBUTTONINFOW;
  1291. #ifdef UNICODE
  1292. #define TBBUTTONINFO TBBUTTONINFOW
  1293. #define LPTBBUTTONINFO LPTBBUTTONINFOW
  1294. #else
  1295. #define TBBUTTONINFO TBBUTTONINFOA
  1296. #define LPTBBUTTONINFO LPTBBUTTONINFOA
  1297. #endif
  1298. // BUTTONINFO APIs do NOT support the string pool.
  1299. #define TB_GETBUTTONINFOW (WM_USER + 63)
  1300. #define TB_SETBUTTONINFOW (WM_USER + 64)
  1301. #define TB_GETBUTTONINFOA (WM_USER + 65)
  1302. #define TB_SETBUTTONINFOA (WM_USER + 66)
  1303. #ifdef UNICODE
  1304. #define TB_GETBUTTONINFO TB_GETBUTTONINFOW
  1305. #define TB_SETBUTTONINFO TB_SETBUTTONINFOW
  1306. #else
  1307. #define TB_GETBUTTONINFO TB_GETBUTTONINFOA
  1308. #define TB_SETBUTTONINFO TB_SETBUTTONINFOA
  1309. #endif
  1310. #define TB_INSERTBUTTONW (WM_USER + 67)
  1311. #define TB_ADDBUTTONSW (WM_USER + 68)
  1312. #define TB_HITTEST (WM_USER + 69)
  1313. // New post Win95/NT4 for InsertButton and AddButton. if iString member
  1314. // is a pointer to a string, it will be handled as a string like listview
  1315. // (although LPSTR_TEXTCALLBACK is not supported).
  1316. #ifdef UNICODE
  1317. #define TB_INSERTBUTTON TB_INSERTBUTTONW
  1318. #define TB_ADDBUTTONS TB_ADDBUTTONSW
  1319. #else
  1320. #define TB_INSERTBUTTON TB_INSERTBUTTONA
  1321. #define TB_ADDBUTTONS TB_ADDBUTTONSA
  1322. #endif
  1323. #define TB_SETDRAWTEXTFLAGS (WM_USER + 70) // wParam == mask lParam == bit values
  1324. #endif // _WIN32_IE >= 0x0400
  1325. #if (_WIN32_IE >= 0x0500)
  1326. #define TB_GETSTRINGW (WM_USER + 91)
  1327. #define TB_GETSTRINGA (WM_USER + 92)
  1328. #ifdef UNICODE
  1329. #define TB_GETSTRING TB_GETSTRINGW
  1330. #else
  1331. #define TB_GETSTRING TB_GETSTRINGA
  1332. #endif
  1333. #endif // _WIN32_IE >= 0x0500
  1334. #if (_WIN32_WINNT >= 0x501)
  1335. #define TBMF_PAD 0x00000001
  1336. #define TBMF_BARPAD 0x00000002
  1337. #define TBMF_BUTTONSPACING 0x00000004
  1338. typedef struct {
  1339. UINT cbSize;
  1340. DWORD dwMask;
  1341. int cxPad; // PAD
  1342. int cyPad;
  1343. int cxBarPad; // BARPAD
  1344. int cyBarPad;
  1345. int cxButtonSpacing; // BUTTONSPACING
  1346. int cyButtonSpacing;
  1347. } TBMETRICS, * LPTBMETRICS;
  1348. #define TB_GETMETRICS (WM_USER + 101)
  1349. #define TB_SETMETRICS (WM_USER + 102)
  1350. #endif
  1351. #if (_WIN32_WINNT >= 0x501)
  1352. #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
  1353. #endif
  1354. #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
  1355. #define TBN_BEGINDRAG (TBN_FIRST-1)
  1356. #define TBN_ENDDRAG (TBN_FIRST-2)
  1357. #define TBN_BEGINADJUST (TBN_FIRST-3)
  1358. #define TBN_ENDADJUST (TBN_FIRST-4)
  1359. #define TBN_RESET (TBN_FIRST-5)
  1360. #define TBN_QUERYINSERT (TBN_FIRST-6)
  1361. #define TBN_QUERYDELETE (TBN_FIRST-7)
  1362. #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
  1363. #define TBN_CUSTHELP (TBN_FIRST-9)
  1364. #if (_WIN32_IE >= 0x0300)
  1365. #define TBN_DROPDOWN (TBN_FIRST - 10)
  1366. #endif
  1367. #if (_WIN32_IE >= 0x0400)
  1368. #define TBN_GETOBJECT (TBN_FIRST - 12)
  1369. // Structure for TBN_HOTITEMCHANGE notification
  1370. //
  1371. typedef struct tagNMTBHOTITEM
  1372. {
  1373. NMHDR hdr;
  1374. int idOld;
  1375. int idNew;
  1376. DWORD dwFlags; // HICF_*
  1377. } NMTBHOTITEM, * LPNMTBHOTITEM;
  1378. // Hot item change flags
  1379. #define HICF_OTHER 0x00000000
  1380. #define HICF_MOUSE 0x00000001 // Triggered by mouse
  1381. #define HICF_ARROWKEYS 0x00000002 // Triggered by arrow keys
  1382. #define HICF_ACCELERATOR 0x00000004 // Triggered by accelerator
  1383. #define HICF_DUPACCEL 0x00000008 // This accelerator is not unique
  1384. #define HICF_ENTERING 0x00000010 // idOld is invalid
  1385. #define HICF_LEAVING 0x00000020 // idNew is invalid
  1386. #define HICF_RESELECT 0x00000040 // hot item reselected
  1387. #define HICF_LMOUSE 0x00000080 // left mouse button selected
  1388. #define HICF_TOGGLEDROPDOWN 0x00000100 // Toggle button's dropdown state
  1389. #define TBN_HOTITEMCHANGE (TBN_FIRST - 13)
  1390. #define TBN_DRAGOUT (TBN_FIRST - 14) // this is sent when the user clicks down on a button then drags off the button
  1391. #define TBN_DELETINGBUTTON (TBN_FIRST - 15) // uses TBNOTIFY
  1392. #define TBN_GETDISPINFOA (TBN_FIRST - 16) // This is sent when the toolbar needs some display information
  1393. #define TBN_GETDISPINFOW (TBN_FIRST - 17) // This is sent when the toolbar needs some display information
  1394. #define TBN_GETINFOTIPA (TBN_FIRST - 18)
  1395. #define TBN_GETINFOTIPW (TBN_FIRST - 19)
  1396. #define TBN_GETBUTTONINFOW (TBN_FIRST - 20)
  1397. #if (_WIN32_IE >= 0x0500)
  1398. #define TBN_RESTORE (TBN_FIRST - 21)
  1399. #define TBN_SAVE (TBN_FIRST - 22)
  1400. #define TBN_INITCUSTOMIZE (TBN_FIRST - 23)
  1401. #define TBNRF_HIDEHELP 0x00000001
  1402. #define TBNRF_ENDCUSTOMIZE 0x00000002
  1403. #endif // (_WIN32_IE >= 0x0500)
  1404. #if (_WIN32_IE >= 0x0500)
  1405. typedef struct tagNMTBSAVE
  1406. {
  1407. NMHDR hdr;
  1408. DWORD* pData;
  1409. DWORD* pCurrent;
  1410. UINT cbData;
  1411. int iItem;
  1412. int cButtons;
  1413. TBBUTTON tbButton;
  1414. } NMTBSAVE, *LPNMTBSAVE;
  1415. typedef struct tagNMTBRESTORE
  1416. {
  1417. NMHDR hdr;
  1418. DWORD* pData;
  1419. DWORD* pCurrent;
  1420. UINT cbData;
  1421. int iItem;
  1422. int cButtons;
  1423. int cbBytesPerRecord;
  1424. TBBUTTON tbButton;
  1425. } NMTBRESTORE, *LPNMTBRESTORE;
  1426. #endif // (_WIN32_IE >= 0x0500)
  1427. typedef struct tagNMTBGETINFOTIPA
  1428. {
  1429. NMHDR hdr;
  1430. LPSTR pszText;
  1431. int cchTextMax;
  1432. int iItem;
  1433. LPARAM lParam;
  1434. } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
  1435. typedef struct tagNMTBGETINFOTIPW
  1436. {
  1437. NMHDR hdr;
  1438. LPWSTR pszText;
  1439. int cchTextMax;
  1440. int iItem;
  1441. LPARAM lParam;
  1442. } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
  1443. #ifdef UNICODE
  1444. #define TBN_GETINFOTIP TBN_GETINFOTIPW
  1445. #define NMTBGETINFOTIP NMTBGETINFOTIPW
  1446. #define LPNMTBGETINFOTIP LPNMTBGETINFOTIPW
  1447. #else
  1448. #define TBN_GETINFOTIP TBN_GETINFOTIPA
  1449. #define NMTBGETINFOTIP NMTBGETINFOTIPA
  1450. #define LPNMTBGETINFOTIP LPNMTBGETINFOTIPA
  1451. #endif
  1452. #define TBNF_IMAGE 0x00000001
  1453. #define TBNF_TEXT 0x00000002
  1454. #define TBNF_DI_SETITEM 0x10000000
  1455. typedef struct {
  1456. NMHDR hdr;
  1457. DWORD dwMask; // [in] Specifies the values requested .[out] Client ask the data to be set for future use
  1458. int idCommand; // [in] id of button we're requesting info for
  1459. DWORD_PTR lParam; // [in] lParam of button
  1460. int iImage; // [out] image index
  1461. LPSTR pszText; // [out] new text for item
  1462. int cchText; // [in] size of buffer pointed to by pszText
  1463. } NMTBDISPINFOA, *LPNMTBDISPINFOA;
  1464. typedef struct {
  1465. NMHDR hdr;
  1466. DWORD dwMask; //[in] Specifies the values requested .[out] Client ask the data to be set for future use
  1467. int idCommand; // [in] id of button we're requesting info for
  1468. DWORD_PTR lParam; // [in] lParam of button
  1469. int iImage; // [out] image index
  1470. LPWSTR pszText; // [out] new text for item
  1471. int cchText; // [in] size of buffer pointed to by pszText
  1472. } NMTBDISPINFOW, *LPNMTBDISPINFOW;
  1473. #ifdef UNICODE
  1474. #define TBN_GETDISPINFO TBN_GETDISPINFOW
  1475. #define NMTBDISPINFO NMTBDISPINFOW
  1476. #define LPNMTBDISPINFO LPNMTBDISPINFOW
  1477. #else
  1478. #define TBN_GETDISPINFO TBN_GETDISPINFOA
  1479. #define NMTBDISPINFO NMTBDISPINFOA
  1480. #define LPNMTBDISPINFO LPNMTBDISPINFOA
  1481. #endif
  1482. // Return codes for TBN_DROPDOWN
  1483. #define TBDDRET_DEFAULT 0
  1484. #define TBDDRET_NODEFAULT 1
  1485. #define TBDDRET_TREATPRESSED 2 // Treat as a standard press button
  1486. #endif
  1487. #ifdef UNICODE
  1488. #define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW
  1489. #else
  1490. #define TBN_GETBUTTONINFO TBN_GETBUTTONINFOA
  1491. #endif
  1492. #if (_WIN32_IE >= 0x0300)
  1493. #define TBNOTIFYA NMTOOLBARA
  1494. #define TBNOTIFYW NMTOOLBARW
  1495. #define LPTBNOTIFYA LPNMTOOLBARA
  1496. #define LPTBNOTIFYW LPNMTOOLBARW
  1497. #else
  1498. #define tagNMTOOLBARA tagTBNOTIFYA
  1499. #define NMTOOLBARA TBNOTIFYA
  1500. #define LPNMTOOLBARA LPTBNOTIFYA
  1501. #define tagNMTOOLBARW tagTBNOTIFYW
  1502. #define NMTOOLBARW TBNOTIFYW
  1503. #define LPNMTOOLBARW LPTBNOTIFYW
  1504. #endif
  1505. #define TBNOTIFY NMTOOLBAR
  1506. #define LPTBNOTIFY LPNMTOOLBAR
  1507. #if (_WIN32_IE >= 0x0300)
  1508. typedef struct tagNMTOOLBARA {
  1509. NMHDR hdr;
  1510. int iItem;
  1511. TBBUTTON tbButton;
  1512. int cchText;
  1513. LPSTR pszText;
  1514. #if (_WIN32_IE >= 0x500)
  1515. RECT rcButton;
  1516. #endif
  1517. } NMTOOLBARA, *LPNMTOOLBARA;
  1518. #endif
  1519. #if (_WIN32_IE >= 0x0300)
  1520. typedef struct tagNMTOOLBARW {
  1521. NMHDR hdr;
  1522. int iItem;
  1523. TBBUTTON tbButton;
  1524. int cchText;
  1525. LPWSTR pszText;
  1526. #if (_WIN32_IE >= 0x500)
  1527. RECT rcButton;
  1528. #endif
  1529. } NMTOOLBARW, *LPNMTOOLBARW;
  1530. #endif
  1531. #ifdef UNICODE
  1532. #define NMTOOLBAR NMTOOLBARW
  1533. #define LPNMTOOLBAR LPNMTOOLBARW
  1534. #else
  1535. #define NMTOOLBAR NMTOOLBARA
  1536. #define LPNMTOOLBAR LPNMTOOLBARA
  1537. #endif
  1538. #endif
  1539. #endif // NOTOOLBAR
  1540. #if (_WIN32_IE >= 0x0300)
  1541. //====== REBAR CONTROL ========================================================
  1542. #ifndef NOREBAR
  1543. #ifdef _WIN32
  1544. #define REBARCLASSNAMEW L"ReBarWindow32"
  1545. #define REBARCLASSNAMEA "ReBarWindow32"
  1546. #ifdef UNICODE
  1547. #define REBARCLASSNAME REBARCLASSNAMEW
  1548. #else
  1549. #define REBARCLASSNAME REBARCLASSNAMEA
  1550. #endif
  1551. #else
  1552. #define REBARCLASSNAME "ReBarWindow"
  1553. #endif
  1554. #define RBIM_IMAGELIST 0x00000001
  1555. // begin_r_commctrl
  1556. #if (_WIN32_IE >= 0x0400)
  1557. #define RBS_TOOLTIPS 0x0100
  1558. #define RBS_VARHEIGHT 0x0200
  1559. #define RBS_BANDBORDERS 0x0400
  1560. #define RBS_FIXEDORDER 0x0800
  1561. #define RBS_REGISTERDROP 0x1000
  1562. #define RBS_AUTOSIZE 0x2000
  1563. #define RBS_VERTICALGRIPPER 0x4000 // this always has the vertical gripper (default for horizontal mode)
  1564. #define RBS_DBLCLKTOGGLE 0x8000
  1565. #else
  1566. #define RBS_TOOLTIPS 0x00000100
  1567. #define RBS_VARHEIGHT 0x00000200
  1568. #define RBS_BANDBORDERS 0x00000400
  1569. #define RBS_FIXEDORDER 0x00000800
  1570. #endif // _WIN32_IE >= 0x0400
  1571. // end_r_commctrl
  1572. typedef struct tagREBARINFO
  1573. {
  1574. UINT cbSize;
  1575. UINT fMask;
  1576. #ifndef NOIMAGEAPIS
  1577. HIMAGELIST himl;
  1578. #else
  1579. HANDLE himl;
  1580. #endif
  1581. } REBARINFO, *LPREBARINFO;
  1582. #define RBBS_BREAK 0x00000001 // break to new line
  1583. #define RBBS_FIXEDSIZE 0x00000002 // band can't be sized
  1584. #define RBBS_CHILDEDGE 0x00000004 // edge around top & bottom of child window
  1585. #define RBBS_HIDDEN 0x00000008 // don't show
  1586. #define RBBS_NOVERT 0x00000010 // don't show when vertical
  1587. #define RBBS_FIXEDBMP 0x00000020 // bitmap doesn't move during band resize
  1588. #if (_WIN32_IE >= 0x0400) //
  1589. #define RBBS_VARIABLEHEIGHT 0x00000040 // allow autosizing of this child vertically
  1590. #define RBBS_GRIPPERALWAYS 0x00000080 // always show the gripper
  1591. #define RBBS_NOGRIPPER 0x00000100 // never show the gripper
  1592. #if (_WIN32_IE >= 0x0500) //
  1593. #define RBBS_USECHEVRON 0x00000200 // display drop-down button for this band if it's sized smaller than ideal width
  1594. #if (_WIN32_IE >= 0x0501) //
  1595. #define RBBS_HIDETITLE 0x00000400 // keep band title hidden
  1596. #define RBBS_TOPALIGN 0x00000800 // keep band title hidden
  1597. #endif // 0x0501 //
  1598. #endif // 0x0500 //
  1599. #endif // 0x0400 //
  1600. #define RBBIM_STYLE 0x00000001
  1601. #define RBBIM_COLORS 0x00000002
  1602. #define RBBIM_TEXT 0x00000004
  1603. #define RBBIM_IMAGE 0x00000008
  1604. #define RBBIM_CHILD 0x00000010
  1605. #define RBBIM_CHILDSIZE 0x00000020
  1606. #define RBBIM_SIZE 0x00000040
  1607. #define RBBIM_BACKGROUND 0x00000080
  1608. #define RBBIM_ID 0x00000100
  1609. #if (_WIN32_IE >= 0x0400)
  1610. #define RBBIM_IDEALSIZE 0x00000200
  1611. #define RBBIM_LPARAM 0x00000400
  1612. #define RBBIM_HEADERSIZE 0x00000800 // control the size of the header
  1613. #endif
  1614. typedef struct tagREBARBANDINFOA
  1615. {
  1616. UINT cbSize;
  1617. UINT fMask;
  1618. UINT fStyle;
  1619. COLORREF clrFore;
  1620. COLORREF clrBack;
  1621. LPSTR lpText;
  1622. UINT cch;
  1623. int iImage;
  1624. HWND hwndChild;
  1625. UINT cxMinChild;
  1626. UINT cyMinChild;
  1627. UINT cx;
  1628. HBITMAP hbmBack;
  1629. UINT wID;
  1630. #if (_WIN32_IE >= 0x0400)
  1631. UINT cyChild;
  1632. UINT cyMaxChild;
  1633. UINT cyIntegral;
  1634. UINT cxIdeal;
  1635. LPARAM lParam;
  1636. UINT cxHeader;
  1637. #endif
  1638. } REBARBANDINFOA, *LPREBARBANDINFOA;
  1639. typedef REBARBANDINFOA CONST *LPCREBARBANDINFOA;
  1640. #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
  1641. #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
  1642. typedef struct tagREBARBANDINFOW
  1643. {
  1644. UINT cbSize;
  1645. UINT fMask;
  1646. UINT fStyle;
  1647. COLORREF clrFore;
  1648. COLORREF clrBack;
  1649. LPWSTR lpText;
  1650. UINT cch;
  1651. int iImage;
  1652. HWND hwndChild;
  1653. UINT cxMinChild;
  1654. UINT cyMinChild;
  1655. UINT cx;
  1656. HBITMAP hbmBack;
  1657. UINT wID;
  1658. #if (_WIN32_IE >= 0x0400)
  1659. UINT cyChild;
  1660. UINT cyMaxChild;
  1661. UINT cyIntegral;
  1662. UINT cxIdeal;
  1663. LPARAM lParam;
  1664. UINT cxHeader;
  1665. #endif
  1666. } REBARBANDINFOW, *LPREBARBANDINFOW;
  1667. typedef REBARBANDINFOW CONST *LPCREBARBANDINFOW;
  1668. #ifdef UNICODE
  1669. #define REBARBANDINFO REBARBANDINFOW
  1670. #define LPREBARBANDINFO LPREBARBANDINFOW
  1671. #define LPCREBARBANDINFO LPCREBARBANDINFOW
  1672. #define REBARBANDINFO_V3_SIZE REBARBANDINFOW_V3_SIZE
  1673. #else
  1674. #define REBARBANDINFO REBARBANDINFOA
  1675. #define LPREBARBANDINFO LPREBARBANDINFOA
  1676. #define LPCREBARBANDINFO LPCREBARBANDINFOA
  1677. #define REBARBANDINFO_V3_SIZE REBARBANDINFOA_V3_SIZE
  1678. #endif
  1679. #define RB_INSERTBANDA (WM_USER + 1)
  1680. #define RB_DELETEBAND (WM_USER + 2)
  1681. #define RB_GETBARINFO (WM_USER + 3)
  1682. #define RB_SETBARINFO (WM_USER + 4)
  1683. #if (_WIN32_IE < 0x0400)
  1684. #define RB_GETBANDINFO (WM_USER + 5)
  1685. #endif
  1686. #define RB_SETBANDINFOA (WM_USER + 6)
  1687. #define RB_SETPARENT (WM_USER + 7)
  1688. #if (_WIN32_IE >= 0x0400)
  1689. #define RB_HITTEST (WM_USER + 8)
  1690. #define RB_GETRECT (WM_USER + 9)
  1691. #endif
  1692. #define RB_INSERTBANDW (WM_USER + 10)
  1693. #define RB_SETBANDINFOW (WM_USER + 11)
  1694. #define RB_GETBANDCOUNT (WM_USER + 12)
  1695. #define RB_GETROWCOUNT (WM_USER + 13)
  1696. #define RB_GETROWHEIGHT (WM_USER + 14)
  1697. #if (_WIN32_IE >= 0x0400)
  1698. #define RB_IDTOINDEX (WM_USER + 16) // wParam == id
  1699. #define RB_GETTOOLTIPS (WM_USER + 17)
  1700. #define RB_SETTOOLTIPS (WM_USER + 18)
  1701. #define RB_SETBKCOLOR (WM_USER + 19) // sets the default BK color
  1702. #define RB_GETBKCOLOR (WM_USER + 20) // defaults to CLR_NONE
  1703. #define RB_SETTEXTCOLOR (WM_USER + 21)
  1704. #define RB_GETTEXTCOLOR (WM_USER + 22) // defaults to 0x00000000
  1705. #if (_WIN32_WINNT >= 0x0501)
  1706. #define RBSTR_CHANGERECT 0x0001 // flags for RB_SIZETORECT
  1707. #endif
  1708. #define RB_SIZETORECT (WM_USER + 23) // resize the rebar/break bands and such to this rect (lparam)
  1709. #endif // _WIN32_IE >= 0x0400
  1710. #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME // lParam is color scheme
  1711. #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME // fills in COLORSCHEME pointed to by lParam
  1712. #ifdef UNICODE
  1713. #define RB_INSERTBAND RB_INSERTBANDW
  1714. #define RB_SETBANDINFO RB_SETBANDINFOW
  1715. #else
  1716. #define RB_INSERTBAND RB_INSERTBANDA
  1717. #define RB_SETBANDINFO RB_SETBANDINFOA
  1718. #endif
  1719. #if (_WIN32_IE >= 0x0400)
  1720. // for manual drag control
  1721. // lparam == cursor pos
  1722. // -1 means do it yourself.
  1723. // -2 means use what you had saved before
  1724. #define RB_BEGINDRAG (WM_USER + 24)
  1725. #define RB_ENDDRAG (WM_USER + 25)
  1726. #define RB_DRAGMOVE (WM_USER + 26)
  1727. #define RB_GETBARHEIGHT (WM_USER + 27)
  1728. #define RB_GETBANDINFOW (WM_USER + 28)
  1729. #define RB_GETBANDINFOA (WM_USER + 29)
  1730. #ifdef UNICODE
  1731. #define RB_GETBANDINFO RB_GETBANDINFOW
  1732. #else
  1733. #define RB_GETBANDINFO RB_GETBANDINFOA
  1734. #endif
  1735. #define RB_MINIMIZEBAND (WM_USER + 30)
  1736. #define RB_MAXIMIZEBAND (WM_USER + 31)
  1737. #define RB_GETDROPTARGET (CCM_GETDROPTARGET)
  1738. #define RB_GETBANDBORDERS (WM_USER + 34) // returns in lparam = lprc the amount of edges added to band wparam
  1739. #define RB_SHOWBAND (WM_USER + 35) // show/hide band
  1740. #define RB_SETPALETTE (WM_USER + 37)
  1741. #define RB_GETPALETTE (WM_USER + 38)
  1742. #define RB_MOVEBAND (WM_USER + 39)
  1743. #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  1744. #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  1745. #endif // _WIN32_IE >= 0x0400
  1746. #if (_WIN32_WINNT >= 0x501)
  1747. #define RB_GETBANDMARGINS (WM_USER + 40)
  1748. #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
  1749. #endif
  1750. #if (_WIN32_IE >= 0x0500)
  1751. #define RB_PUSHCHEVRON (WM_USER + 43)
  1752. #endif // _WIN32_IE >= 0x0500
  1753. #define RBN_HEIGHTCHANGE (RBN_FIRST - 0)
  1754. #if (_WIN32_IE >= 0x0400)
  1755. #define RBN_GETOBJECT (RBN_FIRST - 1)
  1756. #define RBN_LAYOUTCHANGED (RBN_FIRST - 2)
  1757. #define RBN_AUTOSIZE (RBN_FIRST - 3)
  1758. #define RBN_BEGINDRAG (RBN_FIRST - 4)
  1759. #define RBN_ENDDRAG (RBN_FIRST - 5)
  1760. #define RBN_DELETINGBAND (RBN_FIRST - 6) // Uses NMREBAR
  1761. #define RBN_DELETEDBAND (RBN_FIRST - 7) // Uses NMREBAR
  1762. #define RBN_CHILDSIZE (RBN_FIRST - 8)
  1763. #if (_WIN32_IE >= 0x0500)
  1764. #define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
  1765. #endif // _WIN32_IE >= 0x0500
  1766. #if (_WIN32_IE >= 0x0500)
  1767. #define RBN_MINMAX (RBN_FIRST - 21)
  1768. #endif
  1769. #if (_WIN32_WINNT >= 0x0501)
  1770. #define RBN_AUTOBREAK (RBN_FIRST - 22)
  1771. #endif
  1772. typedef struct tagNMREBARCHILDSIZE
  1773. {
  1774. NMHDR hdr;
  1775. UINT uBand;
  1776. UINT wID;
  1777. RECT rcChild;
  1778. RECT rcBand;
  1779. } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
  1780. typedef struct tagNMREBAR
  1781. {
  1782. NMHDR hdr;
  1783. DWORD dwMask; // RBNM_*
  1784. UINT uBand;
  1785. UINT fStyle;
  1786. UINT wID;
  1787. LPARAM lParam;
  1788. } NMREBAR, *LPNMREBAR;
  1789. // Mask flags for NMREBAR
  1790. #define RBNM_ID 0x00000001
  1791. #define RBNM_STYLE 0x00000002
  1792. #define RBNM_LPARAM 0x00000004
  1793. typedef struct tagNMRBAUTOSIZE
  1794. {
  1795. NMHDR hdr;
  1796. BOOL fChanged;
  1797. RECT rcTarget;
  1798. RECT rcActual;
  1799. } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
  1800. #if (_WIN32_IE >= 0x0500)
  1801. typedef struct tagNMREBARCHEVRON
  1802. {
  1803. NMHDR hdr;
  1804. UINT uBand;
  1805. UINT wID;
  1806. LPARAM lParam;
  1807. RECT rc;
  1808. LPARAM lParamNM;
  1809. } NMREBARCHEVRON, *LPNMREBARCHEVRON;
  1810. #endif
  1811. #if (_WIN32_WINNT >= 0x0501)
  1812. #define RBAB_AUTOSIZE 0x0001 // These are not flags and are all mutually exclusive
  1813. #define RBAB_ADDBAND 0x0002
  1814. typedef struct tagNMREBARAUTOBREAK
  1815. {
  1816. NMHDR hdr;
  1817. UINT uBand;
  1818. UINT wID;
  1819. LPARAM lParam;
  1820. UINT uMsg;
  1821. UINT fStyleCurrent;
  1822. BOOL fAutoBreak;
  1823. } NMREBARAUTOBREAK, *LPNMREBARAUTOBREAK;
  1824. #endif
  1825. #define RBHT_NOWHERE 0x0001
  1826. #define RBHT_CAPTION 0x0002
  1827. #define RBHT_CLIENT 0x0003
  1828. #define RBHT_GRABBER 0x0004
  1829. #if (_WIN32_IE >= 0x0500)
  1830. #define RBHT_CHEVRON 0x0008
  1831. #endif
  1832. typedef struct _RB_HITTESTINFO
  1833. {
  1834. POINT pt;
  1835. UINT flags;
  1836. int iBand;
  1837. } RBHITTESTINFO, *LPRBHITTESTINFO;
  1838. #endif // _WIN32_IE >= 0x0400
  1839. #endif // NOREBAR
  1840. #endif // _WIN32_IE >= 0x0300
  1841. //====== TOOLTIPS CONTROL =====================================================
  1842. #ifndef NOTOOLTIPS
  1843. #ifdef _WIN32
  1844. #define TOOLTIPS_CLASSW L"tooltips_class32"
  1845. #define TOOLTIPS_CLASSA "tooltips_class32"
  1846. #ifdef UNICODE
  1847. #define TOOLTIPS_CLASS TOOLTIPS_CLASSW
  1848. #else
  1849. #define TOOLTIPS_CLASS TOOLTIPS_CLASSA
  1850. #endif
  1851. #else
  1852. #define TOOLTIPS_CLASS "tooltips_class"
  1853. #endif
  1854. #if (_WIN32_IE >= 0x0300)
  1855. #define LPTOOLINFOA LPTTTOOLINFOA
  1856. #define LPTOOLINFOW LPTTTOOLINFOW
  1857. #define TOOLINFOA TTTOOLINFOA
  1858. #define TOOLINFOW TTTOOLINFOW
  1859. #else
  1860. #define TTTOOLINFOA TOOLINFOA
  1861. #define LPTTTOOLINFOA LPTOOLINFOA
  1862. #define TTTOOLINFOW TOOLINFOW
  1863. #define LPTTTOOLINFOW LPTOOLINFOW
  1864. #endif
  1865. #define LPTOOLINFO LPTTTOOLINFO
  1866. #define TOOLINFO TTTOOLINFO
  1867. #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
  1868. #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
  1869. #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
  1870. #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
  1871. #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
  1872. #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
  1873. typedef struct tagTOOLINFOA {
  1874. UINT cbSize;
  1875. UINT uFlags;
  1876. HWND hwnd;
  1877. UINT_PTR uId;
  1878. RECT rect;
  1879. HINSTANCE hinst;
  1880. LPSTR lpszText;
  1881. #if (_WIN32_IE >= 0x0300)
  1882. LPARAM lParam;
  1883. #endif
  1884. #if (_WIN32_WINNT >= 0x0501)
  1885. void *lpReserved;
  1886. #endif
  1887. } TTTOOLINFOA, NEAR *PTOOLINFOA, *LPTTTOOLINFOA;
  1888. typedef struct tagTOOLINFOW {
  1889. UINT cbSize;
  1890. UINT uFlags;
  1891. HWND hwnd;
  1892. UINT_PTR uId;
  1893. RECT rect;
  1894. HINSTANCE hinst;
  1895. LPWSTR lpszText;
  1896. #if (_WIN32_IE >= 0x0300)
  1897. LPARAM lParam;
  1898. #endif
  1899. #if (_WIN32_WINNT >= 0x0501)
  1900. void *lpReserved;
  1901. #endif
  1902. } TTTOOLINFOW, NEAR *PTOOLINFOW, *LPTTTOOLINFOW;
  1903. #ifdef UNICODE
  1904. #define TTTOOLINFO TTTOOLINFOW
  1905. #define PTOOLINFO PTOOLINFOW
  1906. #define LPTTTOOLINFO LPTTTOOLINFOW
  1907. #define TTTOOLINFO_V1_SIZE TTTOOLINFOW_V1_SIZE
  1908. #else
  1909. #define PTOOLINFO PTOOLINFOA
  1910. #define TTTOOLINFO TTTOOLINFOA
  1911. #define LPTTTOOLINFO LPTTTOOLINFOA
  1912. #define TTTOOLINFO_V1_SIZE TTTOOLINFOA_V1_SIZE
  1913. #endif
  1914. // begin_r_commctrl
  1915. #define TTS_ALWAYSTIP 0x01
  1916. #define TTS_NOPREFIX 0x02
  1917. #if (_WIN32_IE >= 0x0500)
  1918. #define TTS_NOANIMATE 0x10
  1919. #define TTS_NOFADE 0x20
  1920. #define TTS_BALLOON 0x40
  1921. #define TTS_CLOSE 0x80
  1922. #endif
  1923. // end_r_commctrl
  1924. #define TTF_IDISHWND 0x0001
  1925. // Use this to center around trackpoint in trackmode
  1926. // -OR- to center around tool in normal mode.
  1927. // Use TTF_ABSOLUTE to place the tip exactly at the track coords when
  1928. // in tracking mode. TTF_ABSOLUTE can be used in conjunction with TTF_CENTERTIP
  1929. // to center the tip absolutely about the track point.
  1930. #define TTF_CENTERTIP 0x0002
  1931. #define TTF_RTLREADING 0x0004
  1932. #define TTF_SUBCLASS 0x0010
  1933. #if (_WIN32_IE >= 0x0300)
  1934. #define TTF_TRACK 0x0020
  1935. #define TTF_ABSOLUTE 0x0080
  1936. #define TTF_TRANSPARENT 0x0100
  1937. #if (_WIN32_IE >= 0x0501)
  1938. #define TTF_PARSELINKS 0x1000
  1939. #endif // _WIN32_IE >= 0x0501
  1940. #define TTF_DI_SETITEM 0x8000 // valid only on the TTN_NEEDTEXT callback
  1941. #endif // _WIN32_IE >= 0x0300
  1942. #define TTDT_AUTOMATIC 0
  1943. #define TTDT_RESHOW 1
  1944. #define TTDT_AUTOPOP 2
  1945. #define TTDT_INITIAL 3
  1946. // ToolTip Icons (Set with TTM_SETTITLE)
  1947. #define TTI_NONE 0
  1948. #define TTI_INFO 1
  1949. #define TTI_WARNING 2
  1950. #define TTI_ERROR 3
  1951. // Tool Tip Messages
  1952. #define TTM_ACTIVATE (WM_USER + 1)
  1953. #define TTM_SETDELAYTIME (WM_USER + 3)
  1954. #define TTM_ADDTOOLA (WM_USER + 4)
  1955. #define TTM_ADDTOOLW (WM_USER + 50)
  1956. #define TTM_DELTOOLA (WM_USER + 5)
  1957. #define TTM_DELTOOLW (WM_USER + 51)
  1958. #define TTM_NEWTOOLRECTA (WM_USER + 6)
  1959. #define TTM_NEWTOOLRECTW (WM_USER + 52)
  1960. #define TTM_RELAYEVENT (WM_USER + 7)
  1961. #define TTM_GETTOOLINFOA (WM_USER + 8)
  1962. #define TTM_GETTOOLINFOW (WM_USER + 53)
  1963. #define TTM_SETTOOLINFOA (WM_USER + 9)
  1964. #define TTM_SETTOOLINFOW (WM_USER + 54)
  1965. #define TTM_HITTESTA (WM_USER +10)
  1966. #define TTM_HITTESTW (WM_USER +55)
  1967. #define TTM_GETTEXTA (WM_USER +11)
  1968. #define TTM_GETTEXTW (WM_USER +56)
  1969. #define TTM_UPDATETIPTEXTA (WM_USER +12)
  1970. #define TTM_UPDATETIPTEXTW (WM_USER +57)
  1971. #define TTM_GETTOOLCOUNT (WM_USER +13)
  1972. #define TTM_ENUMTOOLSA (WM_USER +14)
  1973. #define TTM_ENUMTOOLSW (WM_USER +58)
  1974. #define TTM_GETCURRENTTOOLA (WM_USER + 15)
  1975. #define TTM_GETCURRENTTOOLW (WM_USER + 59)
  1976. #define TTM_WINDOWFROMPOINT (WM_USER + 16)
  1977. #if (_WIN32_IE >= 0x0300)
  1978. #define TTM_TRACKACTIVATE (WM_USER + 17) // wParam = TRUE/FALSE start end lparam = LPTOOLINFO
  1979. #define TTM_TRACKPOSITION (WM_USER + 18) // lParam = dwPos
  1980. #define TTM_SETTIPBKCOLOR (WM_USER + 19)
  1981. #define TTM_SETTIPTEXTCOLOR (WM_USER + 20)
  1982. #define TTM_GETDELAYTIME (WM_USER + 21)
  1983. #define TTM_GETTIPBKCOLOR (WM_USER + 22)
  1984. #define TTM_GETTIPTEXTCOLOR (WM_USER + 23)
  1985. #define TTM_SETMAXTIPWIDTH (WM_USER + 24)
  1986. #define TTM_GETMAXTIPWIDTH (WM_USER + 25)
  1987. #define TTM_SETMARGIN (WM_USER + 26) // lParam = lprc
  1988. #define TTM_GETMARGIN (WM_USER + 27) // lParam = lprc
  1989. #define TTM_POP (WM_USER + 28)
  1990. #endif
  1991. #if (_WIN32_IE >= 0x0400)
  1992. #define TTM_UPDATE (WM_USER + 29)
  1993. #endif
  1994. #if (_WIN32_IE >= 0x0500)
  1995. #define TTM_GETBUBBLESIZE (WM_USER + 30)
  1996. #define TTM_ADJUSTRECT (WM_USER + 31)
  1997. #define TTM_SETTITLEA (WM_USER + 32) // wParam = TTI_*, lParam = char* szTitle
  1998. #define TTM_SETTITLEW (WM_USER + 33) // wParam = TTI_*, lParam = wchar* szTitle
  1999. #endif
  2000. #if (_WIN32_WINNT >= 0x0501)
  2001. #define TTM_POPUP (WM_USER + 34)
  2002. #define TTM_GETTITLE (WM_USER + 35) // wParam = 0, lParam = TTGETTITLE*
  2003. typedef struct _TTGETTITLE
  2004. {
  2005. DWORD dwSize;
  2006. UINT uTitleBitmap;
  2007. UINT cch;
  2008. WCHAR* pszTitle;
  2009. } TTGETTITLE, *PTTGETTITLE;
  2010. #endif
  2011. #ifdef UNICODE
  2012. #define TTM_ADDTOOL TTM_ADDTOOLW
  2013. #define TTM_DELTOOL TTM_DELTOOLW
  2014. #define TTM_NEWTOOLRECT TTM_NEWTOOLRECTW
  2015. #define TTM_GETTOOLINFO TTM_GETTOOLINFOW
  2016. #define TTM_SETTOOLINFO TTM_SETTOOLINFOW
  2017. #define TTM_HITTEST TTM_HITTESTW
  2018. #define TTM_GETTEXT TTM_GETTEXTW
  2019. #define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTW
  2020. #define TTM_ENUMTOOLS TTM_ENUMTOOLSW
  2021. #define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLW
  2022. #if (_WIN32_IE >= 0x0500)
  2023. #define TTM_SETTITLE TTM_SETTITLEW
  2024. #endif
  2025. #else
  2026. #define TTM_ADDTOOL TTM_ADDTOOLA
  2027. #define TTM_DELTOOL TTM_DELTOOLA
  2028. #define TTM_NEWTOOLRECT TTM_NEWTOOLRECTA
  2029. #define TTM_GETTOOLINFO TTM_GETTOOLINFOA
  2030. #define TTM_SETTOOLINFO TTM_SETTOOLINFOA
  2031. #define TTM_HITTEST TTM_HITTESTA
  2032. #define TTM_GETTEXT TTM_GETTEXTA
  2033. #define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTA
  2034. #define TTM_ENUMTOOLS TTM_ENUMTOOLSA
  2035. #define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLA
  2036. #if (_WIN32_IE >= 0x0500)
  2037. #define TTM_SETTITLE TTM_SETTITLEA
  2038. #endif
  2039. #endif
  2040. #if (_WIN32_WINNT >= 0x501)
  2041. #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
  2042. #endif
  2043. #if (_WIN32_IE >= 0x0300)
  2044. #define LPHITTESTINFOW LPTTHITTESTINFOW
  2045. #define LPHITTESTINFOA LPTTHITTESTINFOA
  2046. #else
  2047. #define LPTTHITTESTINFOA LPHITTESTINFOA
  2048. #define LPTTHITTESTINFOW LPHITTESTINFOW
  2049. #endif
  2050. #define LPHITTESTINFO LPTTHITTESTINFO
  2051. typedef struct _TT_HITTESTINFOA {
  2052. HWND hwnd;
  2053. POINT pt;
  2054. TTTOOLINFOA ti;
  2055. } TTHITTESTINFOA, *LPTTHITTESTINFOA;
  2056. typedef struct _TT_HITTESTINFOW {
  2057. HWND hwnd;
  2058. POINT pt;
  2059. TTTOOLINFOW ti;
  2060. } TTHITTESTINFOW, *LPTTHITTESTINFOW;
  2061. #ifdef UNICODE
  2062. #define TTHITTESTINFO TTHITTESTINFOW
  2063. #define LPTTHITTESTINFO LPTTHITTESTINFOW
  2064. #else
  2065. #define TTHITTESTINFO TTHITTESTINFOA
  2066. #define LPTTHITTESTINFO LPTTHITTESTINFOA
  2067. #endif
  2068. #define TTN_GETDISPINFOA (TTN_FIRST - 0)
  2069. #define TTN_GETDISPINFOW (TTN_FIRST - 10)
  2070. #define TTN_SHOW (TTN_FIRST - 1)
  2071. #define TTN_POP (TTN_FIRST - 2)
  2072. #define TTN_LINKCLICK (TTN_FIRST - 3)
  2073. #ifdef UNICODE
  2074. #define TTN_GETDISPINFO TTN_GETDISPINFOW
  2075. #else
  2076. #define TTN_GETDISPINFO TTN_GETDISPINFOA
  2077. #endif
  2078. #define TTN_NEEDTEXT TTN_GETDISPINFO
  2079. #define TTN_NEEDTEXTA TTN_GETDISPINFOA
  2080. #define TTN_NEEDTEXTW TTN_GETDISPINFOW
  2081. #if (_WIN32_IE >= 0x0300)
  2082. #define TOOLTIPTEXTW NMTTDISPINFOW
  2083. #define TOOLTIPTEXTA NMTTDISPINFOA
  2084. #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
  2085. #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
  2086. #else
  2087. #define tagNMTTDISPINFOA tagTOOLTIPTEXTA
  2088. #define NMTTDISPINFOA TOOLTIPTEXTA
  2089. #define LPNMTTDISPINFOA LPTOOLTIPTEXTA
  2090. #define tagNMTTDISPINFOW tagTOOLTIPTEXTW
  2091. #define NMTTDISPINFOW TOOLTIPTEXTW
  2092. #define LPNMTTDISPINFOW LPTOOLTIPTEXTW
  2093. #endif
  2094. #define TOOLTIPTEXT NMTTDISPINFO
  2095. #define LPTOOLTIPTEXT LPNMTTDISPINFO
  2096. #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
  2097. #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
  2098. typedef struct tagNMTTDISPINFOA {
  2099. NMHDR hdr;
  2100. LPSTR lpszText;
  2101. char szText[80];
  2102. HINSTANCE hinst;
  2103. UINT uFlags;
  2104. #if (_WIN32_IE >= 0x0300)
  2105. LPARAM lParam;
  2106. #endif
  2107. } NMTTDISPINFOA, *LPNMTTDISPINFOA;
  2108. typedef struct tagNMTTDISPINFOW {
  2109. NMHDR hdr;
  2110. LPWSTR lpszText;
  2111. WCHAR szText[80];
  2112. HINSTANCE hinst;
  2113. UINT uFlags;
  2114. #if (_WIN32_IE >= 0x0300)
  2115. LPARAM lParam;
  2116. #endif
  2117. } NMTTDISPINFOW, *LPNMTTDISPINFOW;
  2118. #ifdef UNICODE
  2119. #define NMTTDISPINFO NMTTDISPINFOW
  2120. #define LPNMTTDISPINFO LPNMTTDISPINFOW
  2121. #define NMTTDISPINFO_V1_SIZE NMTTDISPINFOW_V1_SIZE
  2122. #else
  2123. #define NMTTDISPINFO NMTTDISPINFOA
  2124. #define LPNMTTDISPINFO LPNMTTDISPINFOA
  2125. #define NMTTDISPINFO_V1_SIZE NMTTDISPINFOA_V1_SIZE
  2126. #endif
  2127. #endif // NOTOOLTIPS
  2128. //====== STATUS BAR CONTROL ===================================================
  2129. #ifndef NOSTATUSBAR
  2130. // begin_r_commctrl
  2131. #define SBARS_SIZEGRIP 0x0100
  2132. #if (_WIN32_IE >= 0x0500)
  2133. #define SBARS_TOOLTIPS 0x0800
  2134. #endif
  2135. #if (_WIN32_IE >= 0x0400)
  2136. // this is a status bar flag, preference to SBARS_TOOLTIPS
  2137. #define SBT_TOOLTIPS 0x0800
  2138. #endif
  2139. // end_r_commctrl
  2140. WINCOMMCTRLAPI void WINAPI DrawStatusTextA(HDC hDC, LPRECT lprc, LPCSTR pszText, UINT uFlags);
  2141. WINCOMMCTRLAPI void WINAPI DrawStatusTextW(HDC hDC, LPRECT lprc, LPCWSTR pszText, UINT uFlags);
  2142. WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowA(LONG style, LPCSTR lpszText, HWND hwndParent, UINT wID);
  2143. WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR lpszText, HWND hwndParent, UINT wID);
  2144. #ifdef UNICODE
  2145. #define CreateStatusWindow CreateStatusWindowW
  2146. #define DrawStatusText DrawStatusTextW
  2147. #else
  2148. #define CreateStatusWindow CreateStatusWindowA
  2149. #define DrawStatusText DrawStatusTextA
  2150. #endif
  2151. #ifdef _WIN32
  2152. #define STATUSCLASSNAMEW L"msctls_statusbar32"
  2153. #define STATUSCLASSNAMEA "msctls_statusbar32"
  2154. #ifdef UNICODE
  2155. #define STATUSCLASSNAME STATUSCLASSNAMEW
  2156. #else
  2157. #define STATUSCLASSNAME STATUSCLASSNAMEA
  2158. #endif
  2159. #else
  2160. #define STATUSCLASSNAME "msctls_statusbar"
  2161. #endif
  2162. #define SB_SETTEXTA (WM_USER+1)
  2163. #define SB_SETTEXTW (WM_USER+11)
  2164. #define SB_GETTEXTA (WM_USER+2)
  2165. #define SB_GETTEXTW (WM_USER+13)
  2166. #define SB_GETTEXTLENGTHA (WM_USER+3)
  2167. #define SB_GETTEXTLENGTHW (WM_USER+12)
  2168. #ifdef UNICODE
  2169. #define SB_GETTEXT SB_GETTEXTW
  2170. #define SB_SETTEXT SB_SETTEXTW
  2171. #define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
  2172. #if (_WIN32_IE >= 0x0400)
  2173. #define SB_SETTIPTEXT SB_SETTIPTEXTW
  2174. #define SB_GETTIPTEXT SB_GETTIPTEXTW
  2175. #endif
  2176. #else
  2177. #define SB_GETTEXT SB_GETTEXTA
  2178. #define SB_SETTEXT SB_SETTEXTA
  2179. #define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA
  2180. #if (_WIN32_IE >= 0x0400)
  2181. #define SB_SETTIPTEXT SB_SETTIPTEXTA
  2182. #define SB_GETTIPTEXT SB_GETTIPTEXTA
  2183. #endif
  2184. #endif
  2185. #define SB_SETPARTS (WM_USER+4)
  2186. #define SB_GETPARTS (WM_USER+6)
  2187. #define SB_GETBORDERS (WM_USER+7)
  2188. #define SB_SETMINHEIGHT (WM_USER+8)
  2189. #define SB_SIMPLE (WM_USER+9)
  2190. #define SB_GETRECT (WM_USER+10)
  2191. #if (_WIN32_IE >= 0x0300)
  2192. #define SB_ISSIMPLE (WM_USER+14)
  2193. #endif
  2194. #if (_WIN32_IE >= 0x0400)
  2195. #define SB_SETICON (WM_USER+15)
  2196. #define SB_SETTIPTEXTA (WM_USER+16)
  2197. #define SB_SETTIPTEXTW (WM_USER+17)
  2198. #define SB_GETTIPTEXTA (WM_USER+18)
  2199. #define SB_GETTIPTEXTW (WM_USER+19)
  2200. #define SB_GETICON (WM_USER+20)
  2201. #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  2202. #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  2203. #endif
  2204. #define SBT_OWNERDRAW 0x1000
  2205. #define SBT_NOBORDERS 0x0100
  2206. #define SBT_POPOUT 0x0200
  2207. #define SBT_RTLREADING 0x0400
  2208. #if (_WIN32_IE >= 0x0500)
  2209. #define SBT_NOTABPARSING 0x0800
  2210. #endif
  2211. #define SB_SETBKCOLOR CCM_SETBKCOLOR // lParam = bkColor
  2212. /// status bar notifications
  2213. #if (_WIN32_IE >= 0x0400)
  2214. #define SBN_SIMPLEMODECHANGE (SBN_FIRST - 0)
  2215. #endif
  2216. #if (_WIN32_IE >= 0x0500)
  2217. // refers to the data saved for simple mode
  2218. #define SB_SIMPLEID 0x00ff
  2219. #endif
  2220. #endif // NOSTATUSBAR
  2221. //====== MENU HELP ============================================================
  2222. #ifndef NOMENUHELP
  2223. WINCOMMCTRLAPI void WINAPI MenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, HINSTANCE hInst, HWND hwndStatus, UINT *lpwIDs);
  2224. WINCOMMCTRLAPI BOOL WINAPI ShowHideMenuCtl(HWND hWnd, UINT_PTR uFlags, LPINT lpInfo);
  2225. WINCOMMCTRLAPI void WINAPI GetEffectiveClientRect(HWND hWnd, LPRECT lprc, LPINT lpInfo);
  2226. #define MINSYSCOMMAND SC_SIZE
  2227. #endif
  2228. //====== TRACKBAR CONTROL =====================================================
  2229. #ifndef NOTRACKBAR
  2230. #ifdef _WIN32
  2231. #define TRACKBAR_CLASSA "msctls_trackbar32"
  2232. #define TRACKBAR_CLASSW L"msctls_trackbar32"
  2233. #ifdef UNICODE
  2234. #define TRACKBAR_CLASS TRACKBAR_CLASSW
  2235. #else
  2236. #define TRACKBAR_CLASS TRACKBAR_CLASSA
  2237. #endif
  2238. #else
  2239. #define TRACKBAR_CLASS "msctls_trackbar"
  2240. #endif
  2241. // begin_r_commctrl
  2242. #define TBS_AUTOTICKS 0x0001
  2243. #define TBS_VERT 0x0002
  2244. #define TBS_HORZ 0x0000
  2245. #define TBS_TOP 0x0004
  2246. #define TBS_BOTTOM 0x0000
  2247. #define TBS_LEFT 0x0004
  2248. #define TBS_RIGHT 0x0000
  2249. #define TBS_BOTH 0x0008
  2250. #define TBS_NOTICKS 0x0010
  2251. #define TBS_ENABLESELRANGE 0x0020
  2252. #define TBS_FIXEDLENGTH 0x0040
  2253. #define TBS_NOTHUMB 0x0080
  2254. #if (_WIN32_IE >= 0x0300)
  2255. #define TBS_TOOLTIPS 0x0100
  2256. #endif
  2257. #if (_WIN32_IE >= 0x0500)
  2258. #define TBS_REVERSED 0x0200 // Accessibility hint: the smaller number (usually the min value) means "high" and the larger number (usually the max value) means "low"
  2259. #endif
  2260. #if (_WIN32_IE >= 0x0501)
  2261. #define TBS_DOWNISLEFT 0x0400 // Down=Left and Up=Right (default is Down=Right and Up=Left)
  2262. #endif
  2263. // end_r_commctrl
  2264. #define TBM_GETPOS (WM_USER)
  2265. #define TBM_GETRANGEMIN (WM_USER+1)
  2266. #define TBM_GETRANGEMAX (WM_USER+2)
  2267. #define TBM_GETTIC (WM_USER+3)
  2268. #define TBM_SETTIC (WM_USER+4)
  2269. #define TBM_SETPOS (WM_USER+5)
  2270. #define TBM_SETRANGE (WM_USER+6)
  2271. #define TBM_SETRANGEMIN (WM_USER+7)
  2272. #define TBM_SETRANGEMAX (WM_USER+8)
  2273. #define TBM_CLEARTICS (WM_USER+9)
  2274. #define TBM_SETSEL (WM_USER+10)
  2275. #define TBM_SETSELSTART (WM_USER+11)
  2276. #define TBM_SETSELEND (WM_USER+12)
  2277. #define TBM_GETPTICS (WM_USER+14)
  2278. #define TBM_GETTICPOS (WM_USER+15)
  2279. #define TBM_GETNUMTICS (WM_USER+16)
  2280. #define TBM_GETSELSTART (WM_USER+17)
  2281. #define TBM_GETSELEND (WM_USER+18)
  2282. #define TBM_CLEARSEL (WM_USER+19)
  2283. #define TBM_SETTICFREQ (WM_USER+20)
  2284. #define TBM_SETPAGESIZE (WM_USER+21)
  2285. #define TBM_GETPAGESIZE (WM_USER+22)
  2286. #define TBM_SETLINESIZE (WM_USER+23)
  2287. #define TBM_GETLINESIZE (WM_USER+24)
  2288. #define TBM_GETTHUMBRECT (WM_USER+25)
  2289. #define TBM_GETCHANNELRECT (WM_USER+26)
  2290. #define TBM_SETTHUMBLENGTH (WM_USER+27)
  2291. #define TBM_GETTHUMBLENGTH (WM_USER+28)
  2292. #if (_WIN32_IE >= 0x0300)
  2293. #define TBM_SETTOOLTIPS (WM_USER+29)
  2294. #define TBM_GETTOOLTIPS (WM_USER+30)
  2295. #define TBM_SETTIPSIDE (WM_USER+31)
  2296. // TrackBar Tip Side flags
  2297. #define TBTS_TOP 0
  2298. #define TBTS_LEFT 1
  2299. #define TBTS_BOTTOM 2
  2300. #define TBTS_RIGHT 3
  2301. #define TBM_SETBUDDY (WM_USER+32) // wparam = BOOL fLeft; (or right)
  2302. #define TBM_GETBUDDY (WM_USER+33) // wparam = BOOL fLeft; (or right)
  2303. #endif
  2304. #if (_WIN32_IE >= 0x0400)
  2305. #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  2306. #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  2307. #endif
  2308. #define TB_LINEUP 0
  2309. #define TB_LINEDOWN 1
  2310. #define TB_PAGEUP 2
  2311. #define TB_PAGEDOWN 3
  2312. #define TB_THUMBPOSITION 4
  2313. #define TB_THUMBTRACK 5
  2314. #define TB_TOP 6
  2315. #define TB_BOTTOM 7
  2316. #define TB_ENDTRACK 8
  2317. #if (_WIN32_IE >= 0x0300)
  2318. // custom draw item specs
  2319. #define TBCD_TICS 0x0001
  2320. #define TBCD_THUMB 0x0002
  2321. #define TBCD_CHANNEL 0x0003
  2322. #endif
  2323. #endif // trackbar
  2324. //====== DRAG LIST CONTROL ====================================================
  2325. #ifndef NODRAGLIST
  2326. typedef struct tagDRAGLISTINFO {
  2327. UINT uNotification;
  2328. HWND hWnd;
  2329. POINT ptCursor;
  2330. } DRAGLISTINFO, *LPDRAGLISTINFO;
  2331. #define DL_BEGINDRAG (WM_USER+133)
  2332. #define DL_DRAGGING (WM_USER+134)
  2333. #define DL_DROPPED (WM_USER+135)
  2334. #define DL_CANCELDRAG (WM_USER+136)
  2335. #define DL_CURSORSET 0
  2336. #define DL_STOPCURSOR 1
  2337. #define DL_COPYCURSOR 2
  2338. #define DL_MOVECURSOR 3
  2339. #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
  2340. WINCOMMCTRLAPI BOOL WINAPI MakeDragList(HWND hLB);
  2341. WINCOMMCTRLAPI void WINAPI DrawInsert(HWND handParent, HWND hLB, int nItem);
  2342. WINCOMMCTRLAPI int WINAPI LBItemFromPt(HWND hLB, POINT pt, BOOL bAutoScroll);
  2343. #endif
  2344. //====== UPDOWN CONTROL =======================================================
  2345. #ifndef NOUPDOWN
  2346. #ifdef _WIN32
  2347. #define UPDOWN_CLASSA "msctls_updown32"
  2348. #define UPDOWN_CLASSW L"msctls_updown32"
  2349. #ifdef UNICODE
  2350. #define UPDOWN_CLASS UPDOWN_CLASSW
  2351. #else
  2352. #define UPDOWN_CLASS UPDOWN_CLASSA
  2353. #endif
  2354. #else
  2355. #define UPDOWN_CLASS "msctls_updown"
  2356. #endif
  2357. typedef struct _UDACCEL {
  2358. UINT nSec;
  2359. UINT nInc;
  2360. } UDACCEL, *LPUDACCEL;
  2361. #define UD_MAXVAL 0x7fff
  2362. #define UD_MINVAL (-UD_MAXVAL)
  2363. // begin_r_commctrl
  2364. #define UDS_WRAP 0x0001
  2365. #define UDS_SETBUDDYINT 0x0002
  2366. #define UDS_ALIGNRIGHT 0x0004
  2367. #define UDS_ALIGNLEFT 0x0008
  2368. #define UDS_AUTOBUDDY 0x0010
  2369. #define UDS_ARROWKEYS 0x0020
  2370. #define UDS_HORZ 0x0040
  2371. #define UDS_NOTHOUSANDS 0x0080
  2372. #if (_WIN32_IE >= 0x0300)
  2373. #define UDS_HOTTRACK 0x0100
  2374. #endif
  2375. // end_r_commctrl
  2376. #define UDM_SETRANGE (WM_USER+101)
  2377. #define UDM_GETRANGE (WM_USER+102)
  2378. #define UDM_SETPOS (WM_USER+103)
  2379. #define UDM_GETPOS (WM_USER+104)
  2380. #define UDM_SETBUDDY (WM_USER+105)
  2381. #define UDM_GETBUDDY (WM_USER+106)
  2382. #define UDM_SETACCEL (WM_USER+107)
  2383. #define UDM_GETACCEL (WM_USER+108)
  2384. #define UDM_SETBASE (WM_USER+109)
  2385. #define UDM_GETBASE (WM_USER+110)
  2386. #if (_WIN32_IE >= 0x0400)
  2387. #define UDM_SETRANGE32 (WM_USER+111)
  2388. #define UDM_GETRANGE32 (WM_USER+112) // wParam & lParam are LPINT
  2389. #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  2390. #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  2391. #endif
  2392. #if (_WIN32_IE >= 0x0500)
  2393. #define UDM_SETPOS32 (WM_USER+113)
  2394. #define UDM_GETPOS32 (WM_USER+114)
  2395. #endif
  2396. WINCOMMCTRLAPI HWND WINAPI CreateUpDownControl(DWORD dwStyle, int x, int y, int cx, int cy,
  2397. HWND hParent, int nID, HINSTANCE hInst,
  2398. HWND hBuddy,
  2399. int nUpper, int nLower, int nPos);
  2400. #if (_WIN32_IE >= 0x0300)
  2401. #define NM_UPDOWN NMUPDOWN
  2402. #define LPNM_UPDOWN LPNMUPDOWN
  2403. #else
  2404. #define NMUPDOWN NM_UPDOWN
  2405. #define LPNMUPDOWN LPNM_UPDOWN
  2406. #endif
  2407. typedef struct _NM_UPDOWN
  2408. {
  2409. NMHDR hdr;
  2410. int iPos;
  2411. int iDelta;
  2412. } NMUPDOWN, *LPNMUPDOWN;
  2413. #define UDN_DELTAPOS (UDN_FIRST - 1)
  2414. #endif // NOUPDOWN
  2415. //====== PROGRESS CONTROL =====================================================
  2416. #ifndef NOPROGRESS
  2417. #ifdef _WIN32
  2418. #define PROGRESS_CLASSA "msctls_progress32"
  2419. #define PROGRESS_CLASSW L"msctls_progress32"
  2420. #ifdef UNICODE
  2421. #define PROGRESS_CLASS PROGRESS_CLASSW
  2422. #else
  2423. #define PROGRESS_CLASS PROGRESS_CLASSA
  2424. #endif
  2425. #else
  2426. #define PROGRESS_CLASS "msctls_progress"
  2427. #endif
  2428. // begin_r_commctrl
  2429. #if (_WIN32_IE >= 0x0300)
  2430. #define PBS_SMOOTH 0x01
  2431. #define PBS_VERTICAL 0x04
  2432. #endif
  2433. // end_r_commctrl
  2434. #define PBM_SETRANGE (WM_USER+1)
  2435. #define PBM_SETPOS (WM_USER+2)
  2436. #define PBM_DELTAPOS (WM_USER+3)
  2437. #define PBM_SETSTEP (WM_USER+4)
  2438. #define PBM_STEPIT (WM_USER+5)
  2439. #if (_WIN32_IE >= 0x0300)
  2440. #define PBM_SETRANGE32 (WM_USER+6) // lParam = high, wParam = low
  2441. typedef struct
  2442. {
  2443. int iLow;
  2444. int iHigh;
  2445. } PBRANGE, *PPBRANGE;
  2446. #define PBM_GETRANGE (WM_USER+7) // wParam = return (TRUE ? low : high). lParam = PPBRANGE or NULL
  2447. #define PBM_GETPOS (WM_USER+8)
  2448. #if (_WIN32_IE >= 0x0400)
  2449. #define PBM_SETBARCOLOR (WM_USER+9) // lParam = bar color
  2450. #endif // _WIN32_IE >= 0x0400
  2451. #define PBM_SETBKCOLOR CCM_SETBKCOLOR // lParam = bkColor
  2452. #endif // _WIN32_IE >= 0x0300
  2453. #if (_WIN32_WINNT >= 0x0501)
  2454. #define PBS_MARQUEE 0x08
  2455. #define PBM_SETMARQUEE (WM_USER+10)
  2456. #endif // _WIN32_WINNT >= 0x0501
  2457. #endif // NOPROGRESS
  2458. //====== HOTKEY CONTROL =======================================================
  2459. #ifndef NOHOTKEY
  2460. #define HOTKEYF_SHIFT 0x01
  2461. #define HOTKEYF_CONTROL 0x02
  2462. #define HOTKEYF_ALT 0x04
  2463. #ifdef _MAC
  2464. #define HOTKEYF_EXT 0x80
  2465. #else
  2466. #define HOTKEYF_EXT 0x08
  2467. #endif
  2468. #define HKCOMB_NONE 0x0001
  2469. #define HKCOMB_S 0x0002
  2470. #define HKCOMB_C 0x0004
  2471. #define HKCOMB_A 0x0008
  2472. #define HKCOMB_SC 0x0010
  2473. #define HKCOMB_SA 0x0020
  2474. #define HKCOMB_CA 0x0040
  2475. #define HKCOMB_SCA 0x0080
  2476. #define HKM_SETHOTKEY (WM_USER+1)
  2477. #define HKM_GETHOTKEY (WM_USER+2)
  2478. #define HKM_SETRULES (WM_USER+3)
  2479. #ifdef _WIN32
  2480. #define HOTKEY_CLASSA "msctls_hotkey32"
  2481. #define HOTKEY_CLASSW L"msctls_hotkey32"
  2482. #ifdef UNICODE
  2483. #define HOTKEY_CLASS HOTKEY_CLASSW
  2484. #else
  2485. #define HOTKEY_CLASS HOTKEY_CLASSA
  2486. #endif
  2487. #else
  2488. #define HOTKEY_CLASS "msctls_hotkey"
  2489. #endif
  2490. #endif // NOHOTKEY
  2491. // begin_r_commctrl
  2492. //====== COMMON CONTROL STYLES ================================================
  2493. #define CCS_TOP 0x00000001L
  2494. #define CCS_NOMOVEY 0x00000002L
  2495. #define CCS_BOTTOM 0x00000003L
  2496. #define CCS_NORESIZE 0x00000004L
  2497. #define CCS_NOPARENTALIGN 0x00000008L
  2498. #define CCS_ADJUSTABLE 0x00000020L
  2499. #define CCS_NODIVIDER 0x00000040L
  2500. #if (_WIN32_IE >= 0x0300)
  2501. #define CCS_VERT 0x00000080L
  2502. #define CCS_LEFT (CCS_VERT | CCS_TOP)
  2503. #define CCS_RIGHT (CCS_VERT | CCS_BOTTOM)
  2504. #define CCS_NOMOVEX (CCS_VERT | CCS_NOMOVEY)
  2505. #endif
  2506. // end_r_commctrl
  2507. //====== LISTVIEW CONTROL =====================================================
  2508. #ifndef NOLISTVIEW
  2509. #ifdef _WIN32
  2510. #define WC_LISTVIEWA "SysListView32"
  2511. #define WC_LISTVIEWW L"SysListView32"
  2512. #ifdef UNICODE
  2513. #define WC_LISTVIEW WC_LISTVIEWW
  2514. #else
  2515. #define WC_LISTVIEW WC_LISTVIEWA
  2516. #endif
  2517. #else
  2518. #define WC_LISTVIEW "SysListView"
  2519. #endif
  2520. // begin_r_commctrl
  2521. #define LVS_ICON 0x0000
  2522. #define LVS_REPORT 0x0001
  2523. #define LVS_SMALLICON 0x0002
  2524. #define LVS_LIST 0x0003
  2525. #define LVS_TYPEMASK 0x0003
  2526. #define LVS_SINGLESEL 0x0004
  2527. #define LVS_SHOWSELALWAYS 0x0008
  2528. #define LVS_SORTASCENDING 0x0010
  2529. #define LVS_SORTDESCENDING 0x0020
  2530. #define LVS_SHAREIMAGELISTS 0x0040
  2531. #define LVS_NOLABELWRAP 0x0080
  2532. #define LVS_AUTOARRANGE 0x0100
  2533. #define LVS_EDITLABELS 0x0200
  2534. #if (_WIN32_IE >= 0x0300)
  2535. #define LVS_OWNERDATA 0x1000
  2536. #endif
  2537. #define LVS_NOSCROLL 0x2000
  2538. #define LVS_TYPESTYLEMASK 0xfc00
  2539. #define LVS_ALIGNTOP 0x0000
  2540. #define LVS_ALIGNLEFT 0x0800
  2541. #define LVS_ALIGNMASK 0x0c00
  2542. #define LVS_OWNERDRAWFIXED 0x0400
  2543. #define LVS_NOCOLUMNHEADER 0x4000
  2544. #define LVS_NOSORTHEADER 0x8000
  2545. // end_r_commctrl
  2546. #if (_WIN32_IE >= 0x0400)
  2547. #define LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  2548. #define ListView_SetUnicodeFormat(hwnd, fUnicode) \
  2549. (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
  2550. #define LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  2551. #define ListView_GetUnicodeFormat(hwnd) \
  2552. (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
  2553. #endif
  2554. #define LVM_GETBKCOLOR (LVM_FIRST + 0)
  2555. #define ListView_GetBkColor(hwnd) \
  2556. (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0L)
  2557. #define LVM_SETBKCOLOR (LVM_FIRST + 1)
  2558. #define ListView_SetBkColor(hwnd, clrBk) \
  2559. (BOOL)SNDMSG((hwnd), LVM_SETBKCOLOR, 0, (LPARAM)(COLORREF)(clrBk))
  2560. #define LVM_GETIMAGELIST (LVM_FIRST + 2)
  2561. #define ListView_GetImageList(hwnd, iImageList) \
  2562. (HIMAGELIST)SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)(INT)(iImageList), 0L)
  2563. #define LVSIL_NORMAL 0
  2564. #define LVSIL_SMALL 1
  2565. #define LVSIL_STATE 2
  2566. #define LVM_SETIMAGELIST (LVM_FIRST + 3)
  2567. #define ListView_SetImageList(hwnd, himl, iImageList) \
  2568. (HIMAGELIST)SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)(iImageList), (LPARAM)(HIMAGELIST)(himl))
  2569. #define LVM_GETITEMCOUNT (LVM_FIRST + 4)
  2570. #define ListView_GetItemCount(hwnd) \
  2571. (int)SNDMSG((hwnd), LVM_GETITEMCOUNT, 0, 0L)
  2572. #define LVIF_TEXT 0x0001
  2573. #define LVIF_IMAGE 0x0002
  2574. #define LVIF_PARAM 0x0004
  2575. #define LVIF_STATE 0x0008
  2576. #if (_WIN32_IE >= 0x0300)
  2577. #define LVIF_INDENT 0x0010
  2578. #define LVIF_NORECOMPUTE 0x0800
  2579. #endif
  2580. #if (_WIN32_WINNT >= 0x501)
  2581. #define LVIF_GROUPID 0x0100
  2582. #define LVIF_COLUMNS 0x0200
  2583. #endif
  2584. #define LVIS_FOCUSED 0x0001
  2585. #define LVIS_SELECTED 0x0002
  2586. #define LVIS_CUT 0x0004
  2587. #define LVIS_DROPHILITED 0x0008
  2588. #define LVIS_GLOW 0x0010
  2589. #define LVIS_ACTIVATING 0x0020
  2590. #define LVIS_OVERLAYMASK 0x0F00
  2591. #define LVIS_STATEIMAGEMASK 0xF000
  2592. #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
  2593. #if (_WIN32_IE >= 0x0300)
  2594. #define I_INDENTCALLBACK (-1)
  2595. #define LV_ITEMA LVITEMA
  2596. #define LV_ITEMW LVITEMW
  2597. #else
  2598. #define tagLVITEMA _LV_ITEMA
  2599. #define LVITEMA LV_ITEMA
  2600. #define tagLVITEMW _LV_ITEMW
  2601. #define LVITEMW LV_ITEMW
  2602. #endif
  2603. #if (_WIN32_WINNT >= 0x501)
  2604. #define I_GROUPIDCALLBACK (-1)
  2605. #define I_GROUPIDNONE (-2)
  2606. #endif
  2607. #define LV_ITEM LVITEM
  2608. #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA, lParam)
  2609. #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW, lParam)
  2610. typedef struct tagLVITEMA
  2611. {
  2612. UINT mask;
  2613. int iItem;
  2614. int iSubItem;
  2615. UINT state;
  2616. UINT stateMask;
  2617. LPSTR pszText;
  2618. int cchTextMax;
  2619. int iImage;
  2620. LPARAM lParam;
  2621. #if (_WIN32_IE >= 0x0300)
  2622. int iIndent;
  2623. #endif
  2624. #if (_WIN32_WINNT >= 0x501)
  2625. int iGroupId;
  2626. UINT cColumns; // tile view columns
  2627. PUINT puColumns;
  2628. #endif
  2629. } LVITEMA, *LPLVITEMA;
  2630. typedef struct tagLVITEMW
  2631. {
  2632. UINT mask;
  2633. int iItem;
  2634. int iSubItem;
  2635. UINT state;
  2636. UINT stateMask;
  2637. LPWSTR pszText;
  2638. int cchTextMax;
  2639. int iImage;
  2640. LPARAM lParam;
  2641. #if (_WIN32_IE >= 0x0300)
  2642. int iIndent;
  2643. #endif
  2644. #if (_WIN32_WINNT >= 0x501)
  2645. int iGroupId;
  2646. UINT cColumns; // tile view columns
  2647. PUINT puColumns;
  2648. #endif
  2649. } LVITEMW, *LPLVITEMW;
  2650. #ifdef UNICODE
  2651. #define LVITEM LVITEMW
  2652. #define LPLVITEM LPLVITEMW
  2653. #define LVITEM_V1_SIZE LVITEMW_V1_SIZE
  2654. #else
  2655. #define LVITEM LVITEMA
  2656. #define LPLVITEM LPLVITEMA
  2657. #define LVITEM_V1_SIZE LVITEMA_V1_SIZE
  2658. #endif
  2659. #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
  2660. #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
  2661. #ifdef UNICODE
  2662. #define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW
  2663. #else
  2664. #define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA
  2665. #endif
  2666. #define I_IMAGECALLBACK (-1)
  2667. #if (_WIN32_IE >= 0x0501)
  2668. #define I_IMAGENONE (-2)
  2669. #endif // 0x0501
  2670. #if (_WIN32_WINNT >= 0x501)
  2671. // For tileview
  2672. #define I_COLUMNSCALLBACK ((UINT)-1)
  2673. #endif
  2674. #define LVM_GETITEMA (LVM_FIRST + 5)
  2675. #define LVM_GETITEMW (LVM_FIRST + 75)
  2676. #ifdef UNICODE
  2677. #define LVM_GETITEM LVM_GETITEMW
  2678. #else
  2679. #define LVM_GETITEM LVM_GETITEMA
  2680. #endif
  2681. #define ListView_GetItem(hwnd, pitem) \
  2682. (BOOL)SNDMSG((hwnd), LVM_GETITEM, 0, (LPARAM)(LV_ITEM *)(pitem))
  2683. #define LVM_SETITEMA (LVM_FIRST + 6)
  2684. #define LVM_SETITEMW (LVM_FIRST + 76)
  2685. #ifdef UNICODE
  2686. #define LVM_SETITEM LVM_SETITEMW
  2687. #else
  2688. #define LVM_SETITEM LVM_SETITEMA
  2689. #endif
  2690. #define ListView_SetItem(hwnd, pitem) \
  2691. (BOOL)SNDMSG((hwnd), LVM_SETITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))
  2692. #define LVM_INSERTITEMA (LVM_FIRST + 7)
  2693. #define LVM_INSERTITEMW (LVM_FIRST + 77)
  2694. #ifdef UNICODE
  2695. #define LVM_INSERTITEM LVM_INSERTITEMW
  2696. #else
  2697. #define LVM_INSERTITEM LVM_INSERTITEMA
  2698. #endif
  2699. #define ListView_InsertItem(hwnd, pitem) \
  2700. (int)SNDMSG((hwnd), LVM_INSERTITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))
  2701. #define LVM_DELETEITEM (LVM_FIRST + 8)
  2702. #define ListView_DeleteItem(hwnd, i) \
  2703. (BOOL)SNDMSG((hwnd), LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
  2704. #define LVM_DELETEALLITEMS (LVM_FIRST + 9)
  2705. #define ListView_DeleteAllItems(hwnd) \
  2706. (BOOL)SNDMSG((hwnd), LVM_DELETEALLITEMS, 0, 0L)
  2707. #define LVM_GETCALLBACKMASK (LVM_FIRST + 10)
  2708. #define ListView_GetCallbackMask(hwnd) \
  2709. (BOOL)SNDMSG((hwnd), LVM_GETCALLBACKMASK, 0, 0)
  2710. #define LVM_SETCALLBACKMASK (LVM_FIRST + 11)
  2711. #define ListView_SetCallbackMask(hwnd, mask) \
  2712. (BOOL)SNDMSG((hwnd), LVM_SETCALLBACKMASK, (WPARAM)(UINT)(mask), 0)
  2713. #define LVNI_ALL 0x0000
  2714. #define LVNI_FOCUSED 0x0001
  2715. #define LVNI_SELECTED 0x0002
  2716. #define LVNI_CUT 0x0004
  2717. #define LVNI_DROPHILITED 0x0008
  2718. #define LVNI_ABOVE 0x0100
  2719. #define LVNI_BELOW 0x0200
  2720. #define LVNI_TOLEFT 0x0400
  2721. #define LVNI_TORIGHT 0x0800
  2722. #define LVM_GETNEXTITEM (LVM_FIRST + 12)
  2723. #define ListView_GetNextItem(hwnd, i, flags) \
  2724. (int)SNDMSG((hwnd), LVM_GETNEXTITEM, (WPARAM)(int)(i), MAKELPARAM((flags), 0))
  2725. #define LVFI_PARAM 0x0001
  2726. #define LVFI_STRING 0x0002
  2727. #define LVFI_PARTIAL 0x0008
  2728. #define LVFI_WRAP 0x0020
  2729. #define LVFI_NEARESTXY 0x0040
  2730. #if (_WIN32_IE >= 0x0300)
  2731. #define LV_FINDINFOA LVFINDINFOA
  2732. #define LV_FINDINFOW LVFINDINFOW
  2733. #else
  2734. #define tagLVFINDINFOA _LV_FINDINFOA
  2735. #define LVFINDINFOA LV_FINDINFOA
  2736. #define tagLVFINDINFOW _LV_FINDINFOW
  2737. #define LVFINDINFOW LV_FINDINFOW
  2738. #endif
  2739. #define LV_FINDINFO LVFINDINFO
  2740. typedef struct tagLVFINDINFOA
  2741. {
  2742. UINT flags;
  2743. LPCSTR psz;
  2744. LPARAM lParam;
  2745. POINT pt;
  2746. UINT vkDirection;
  2747. } LVFINDINFOA, *LPFINDINFOA;
  2748. typedef struct tagLVFINDINFOW
  2749. {
  2750. UINT flags;
  2751. LPCWSTR psz;
  2752. LPARAM lParam;
  2753. POINT pt;
  2754. UINT vkDirection;
  2755. } LVFINDINFOW, *LPFINDINFOW;
  2756. #ifdef UNICODE
  2757. #define LVFINDINFO LVFINDINFOW
  2758. #else
  2759. #define LVFINDINFO LVFINDINFOA
  2760. #endif
  2761. #define LVM_FINDITEMA (LVM_FIRST + 13)
  2762. #define LVM_FINDITEMW (LVM_FIRST + 83)
  2763. #ifdef UNICODE
  2764. #define LVM_FINDITEM LVM_FINDITEMW
  2765. #else
  2766. #define LVM_FINDITEM LVM_FINDITEMA
  2767. #endif
  2768. #define ListView_FindItem(hwnd, iStart, plvfi) \
  2769. (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO *)(plvfi))
  2770. #define LVIR_BOUNDS 0
  2771. #define LVIR_ICON 1
  2772. #define LVIR_LABEL 2
  2773. #define LVIR_SELECTBOUNDS 3
  2774. #define LVM_GETITEMRECT (LVM_FIRST + 14)
  2775. #define ListView_GetItemRect(hwnd, i, prc, code) \
  2776. (BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
  2777. ((prc) ? (((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)) : (LPARAM)(RECT *)NULL))
  2778. #define LVM_SETITEMPOSITION (LVM_FIRST + 15)
  2779. #define ListView_SetItemPosition(hwndLV, i, x, y) \
  2780. (BOOL)SNDMSG((hwndLV), LVM_SETITEMPOSITION, (WPARAM)(int)(i), MAKELPARAM((x), (y)))
  2781. #define LVM_GETITEMPOSITION (LVM_FIRST + 16)
  2782. #define ListView_GetItemPosition(hwndLV, i, ppt) \
  2783. (BOOL)SNDMSG((hwndLV), LVM_GETITEMPOSITION, (WPARAM)(int)(i), (LPARAM)(POINT *)(ppt))
  2784. #define LVM_GETSTRINGWIDTHA (LVM_FIRST + 17)
  2785. #define LVM_GETSTRINGWIDTHW (LVM_FIRST + 87)
  2786. #ifdef UNICODE
  2787. #define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHW
  2788. #else
  2789. #define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHA
  2790. #endif
  2791. #define ListView_GetStringWidth(hwndLV, psz) \
  2792. (int)SNDMSG((hwndLV), LVM_GETSTRINGWIDTH, 0, (LPARAM)(LPCTSTR)(psz))
  2793. #define LVHT_NOWHERE 0x0001
  2794. #define LVHT_ONITEMICON 0x0002
  2795. #define LVHT_ONITEMLABEL 0x0004
  2796. #define LVHT_ONITEMSTATEICON 0x0008
  2797. #define LVHT_ONITEM (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
  2798. #define LVHT_ABOVE 0x0008
  2799. #define LVHT_BELOW 0x0010
  2800. #define LVHT_TORIGHT 0x0020
  2801. #define LVHT_TOLEFT 0x0040
  2802. #if (_WIN32_IE >= 0x0300)
  2803. #define LV_HITTESTINFO LVHITTESTINFO
  2804. #else
  2805. #define tagLVHITTESTINFO _LV_HITTESTINFO
  2806. #define LVHITTESTINFO LV_HITTESTINFO
  2807. #endif
  2808. #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO, iItem)
  2809. typedef struct tagLVHITTESTINFO
  2810. {
  2811. POINT pt;
  2812. UINT flags;
  2813. int iItem;
  2814. #if (_WIN32_IE >= 0x0300)
  2815. int iSubItem; // this is was NOT in win95. valid only for LVM_SUBITEMHITTEST
  2816. #endif
  2817. } LVHITTESTINFO, *LPLVHITTESTINFO;
  2818. #define LVM_HITTEST (LVM_FIRST + 18)
  2819. #define ListView_HitTest(hwndLV, pinfo) \
  2820. (int)SNDMSG((hwndLV), LVM_HITTEST, 0, (LPARAM)(LV_HITTESTINFO *)(pinfo))
  2821. #define LVM_ENSUREVISIBLE (LVM_FIRST + 19)
  2822. #define ListView_EnsureVisible(hwndLV, i, fPartialOK) \
  2823. (BOOL)SNDMSG((hwndLV), LVM_ENSUREVISIBLE, (WPARAM)(int)(i), MAKELPARAM((fPartialOK), 0))
  2824. #define LVM_SCROLL (LVM_FIRST + 20)
  2825. #define ListView_Scroll(hwndLV, dx, dy) \
  2826. (BOOL)SNDMSG((hwndLV), LVM_SCROLL, (WPARAM)(int)(dx), (LPARAM)(int)(dy))
  2827. #define LVM_REDRAWITEMS (LVM_FIRST + 21)
  2828. #define ListView_RedrawItems(hwndLV, iFirst, iLast) \
  2829. (BOOL)SNDMSG((hwndLV), LVM_REDRAWITEMS, (WPARAM)(int)(iFirst), (LPARAM)(int)(iLast))
  2830. #define LVA_DEFAULT 0x0000
  2831. #define LVA_ALIGNLEFT 0x0001
  2832. #define LVA_ALIGNTOP 0x0002
  2833. #define LVA_SNAPTOGRID 0x0005
  2834. #define LVM_ARRANGE (LVM_FIRST + 22)
  2835. #define ListView_Arrange(hwndLV, code) \
  2836. (BOOL)SNDMSG((hwndLV), LVM_ARRANGE, (WPARAM)(UINT)(code), 0L)
  2837. #define LVM_EDITLABELA (LVM_FIRST + 23)
  2838. #define LVM_EDITLABELW (LVM_FIRST + 118)
  2839. #ifdef UNICODE
  2840. #define LVM_EDITLABEL LVM_EDITLABELW
  2841. #else
  2842. #define LVM_EDITLABEL LVM_EDITLABELA
  2843. #endif
  2844. #define ListView_EditLabel(hwndLV, i) \
  2845. (HWND)SNDMSG((hwndLV), LVM_EDITLABEL, (WPARAM)(int)(i), 0L)
  2846. #define LVM_GETEDITCONTROL (LVM_FIRST + 24)
  2847. #define ListView_GetEditControl(hwndLV) \
  2848. (HWND)SNDMSG((hwndLV), LVM_GETEDITCONTROL, 0, 0L)
  2849. #if (_WIN32_IE >= 0x0300)
  2850. #define LV_COLUMNA LVCOLUMNA
  2851. #define LV_COLUMNW LVCOLUMNW
  2852. #else
  2853. #define tagLVCOLUMNA _LV_COLUMNA
  2854. #define LVCOLUMNA LV_COLUMNA
  2855. #define tagLVCOLUMNW _LV_COLUMNW
  2856. #define LVCOLUMNW LV_COLUMNW
  2857. #endif
  2858. #define LV_COLUMN LVCOLUMN
  2859. #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
  2860. #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
  2861. typedef struct tagLVCOLUMNA
  2862. {
  2863. UINT mask;
  2864. int fmt;
  2865. int cx;
  2866. LPSTR pszText;
  2867. int cchTextMax;
  2868. int iSubItem;
  2869. #if (_WIN32_IE >= 0x0300)
  2870. int iImage;
  2871. int iOrder;
  2872. #endif
  2873. } LVCOLUMNA, *LPLVCOLUMNA;
  2874. typedef struct tagLVCOLUMNW
  2875. {
  2876. UINT mask;
  2877. int fmt;
  2878. int cx;
  2879. LPWSTR pszText;
  2880. int cchTextMax;
  2881. int iSubItem;
  2882. #if (_WIN32_IE >= 0x0300)
  2883. int iImage;
  2884. int iOrder;
  2885. #endif
  2886. } LVCOLUMNW, *LPLVCOLUMNW;
  2887. #ifdef UNICODE
  2888. #define LVCOLUMN LVCOLUMNW
  2889. #define LPLVCOLUMN LPLVCOLUMNW
  2890. #define LVCOLUMN_V1_SIZE LVCOLUMNW_V1_SIZE
  2891. #else
  2892. #define LVCOLUMN LVCOLUMNA
  2893. #define LPLVCOLUMN LPLVCOLUMNA
  2894. #define LVCOLUMN_V1_SIZE LVCOLUMNA_V1_SIZE
  2895. #endif
  2896. #define LVCF_FMT 0x0001
  2897. #define LVCF_WIDTH 0x0002
  2898. #define LVCF_TEXT 0x0004
  2899. #define LVCF_SUBITEM 0x0008
  2900. #if (_WIN32_IE >= 0x0300)
  2901. #define LVCF_IMAGE 0x0010
  2902. #define LVCF_ORDER 0x0020
  2903. #endif
  2904. #define LVCFMT_LEFT 0x0000
  2905. #define LVCFMT_RIGHT 0x0001
  2906. #define LVCFMT_CENTER 0x0002
  2907. #define LVCFMT_JUSTIFYMASK 0x0003
  2908. #if (_WIN32_IE >= 0x0300)
  2909. #define LVCFMT_IMAGE 0x0800
  2910. #define LVCFMT_BITMAP_ON_RIGHT 0x1000
  2911. #define LVCFMT_COL_HAS_IMAGES 0x8000
  2912. #endif
  2913. #define LVM_GETCOLUMNA (LVM_FIRST + 25)
  2914. #define LVM_GETCOLUMNW (LVM_FIRST + 95)
  2915. #ifdef UNICODE
  2916. #define LVM_GETCOLUMN LVM_GETCOLUMNW
  2917. #else
  2918. #define LVM_GETCOLUMN LVM_GETCOLUMNA
  2919. #endif
  2920. #define ListView_GetColumn(hwnd, iCol, pcol) \
  2921. (BOOL)SNDMSG((hwnd), LVM_GETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(LV_COLUMN *)(pcol))
  2922. #define LVM_SETCOLUMNA (LVM_FIRST + 26)
  2923. #define LVM_SETCOLUMNW (LVM_FIRST + 96)
  2924. #ifdef UNICODE
  2925. #define LVM_SETCOLUMN LVM_SETCOLUMNW
  2926. #else
  2927. #define LVM_SETCOLUMN LVM_SETCOLUMNA
  2928. #endif
  2929. #define ListView_SetColumn(hwnd, iCol, pcol) \
  2930. (BOOL)SNDMSG((hwnd), LVM_SETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))
  2931. #define LVM_INSERTCOLUMNA (LVM_FIRST + 27)
  2932. #define LVM_INSERTCOLUMNW (LVM_FIRST + 97)
  2933. #ifdef UNICODE
  2934. # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW
  2935. #else
  2936. # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA
  2937. #endif
  2938. #define ListView_InsertColumn(hwnd, iCol, pcol) \
  2939. (int)SNDMSG((hwnd), LVM_INSERTCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))
  2940. #define LVM_DELETECOLUMN (LVM_FIRST + 28)
  2941. #define ListView_DeleteColumn(hwnd, iCol) \
  2942. (BOOL)SNDMSG((hwnd), LVM_DELETECOLUMN, (WPARAM)(int)(iCol), 0)
  2943. #define LVM_GETCOLUMNWIDTH (LVM_FIRST + 29)
  2944. #define ListView_GetColumnWidth(hwnd, iCol) \
  2945. (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
  2946. #define LVSCW_AUTOSIZE -1
  2947. #define LVSCW_AUTOSIZE_USEHEADER -2
  2948. #define LVM_SETCOLUMNWIDTH (LVM_FIRST + 30)
  2949. #define ListView_SetColumnWidth(hwnd, iCol, cx) \
  2950. (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
  2951. #if (_WIN32_IE >= 0x0300)
  2952. #define LVM_GETHEADER (LVM_FIRST + 31)
  2953. #define ListView_GetHeader(hwnd)\
  2954. (HWND)SNDMSG((hwnd), LVM_GETHEADER, 0, 0L)
  2955. #endif
  2956. #define LVM_CREATEDRAGIMAGE (LVM_FIRST + 33)
  2957. #define ListView_CreateDragImage(hwnd, i, lpptUpLeft) \
  2958. (HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))
  2959. #define LVM_GETVIEWRECT (LVM_FIRST + 34)
  2960. #define ListView_GetViewRect(hwnd, prc) \
  2961. (BOOL)SNDMSG((hwnd), LVM_GETVIEWRECT, 0, (LPARAM)(RECT *)(prc))
  2962. #define LVM_GETTEXTCOLOR (LVM_FIRST + 35)
  2963. #define ListView_GetTextColor(hwnd) \
  2964. (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
  2965. #define LVM_SETTEXTCOLOR (LVM_FIRST + 36)
  2966. #define ListView_SetTextColor(hwnd, clrText) \
  2967. (BOOL)SNDMSG((hwnd), LVM_SETTEXTCOLOR, 0, (LPARAM)(COLORREF)(clrText))
  2968. #define LVM_GETTEXTBKCOLOR (LVM_FIRST + 37)
  2969. #define ListView_GetTextBkColor(hwnd) \
  2970. (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0L)
  2971. #define LVM_SETTEXTBKCOLOR (LVM_FIRST + 38)
  2972. #define ListView_SetTextBkColor(hwnd, clrTextBk) \
  2973. (BOOL)SNDMSG((hwnd), LVM_SETTEXTBKCOLOR, 0, (LPARAM)(COLORREF)(clrTextBk))
  2974. #define LVM_GETTOPINDEX (LVM_FIRST + 39)
  2975. #define ListView_GetTopIndex(hwndLV) \
  2976. (int)SNDMSG((hwndLV), LVM_GETTOPINDEX, 0, 0)
  2977. #define LVM_GETCOUNTPERPAGE (LVM_FIRST + 40)
  2978. #define ListView_GetCountPerPage(hwndLV) \
  2979. (int)SNDMSG((hwndLV), LVM_GETCOUNTPERPAGE, 0, 0)
  2980. #define LVM_GETORIGIN (LVM_FIRST + 41)
  2981. #define ListView_GetOrigin(hwndLV, ppt) \
  2982. (BOOL)SNDMSG((hwndLV), LVM_GETORIGIN, (WPARAM)0, (LPARAM)(POINT *)(ppt))
  2983. #define LVM_UPDATE (LVM_FIRST + 42)
  2984. #define ListView_Update(hwndLV, i) \
  2985. (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
  2986. #define LVM_SETITEMSTATE (LVM_FIRST + 43)
  2987. #define ListView_SetItemState(hwndLV, i, data, mask) \
  2988. { LV_ITEM _ms_lvi;\
  2989. _ms_lvi.stateMask = mask;\
  2990. _ms_lvi.state = data;\
  2991. SNDMSG((hwndLV), LVM_SETITEMSTATE, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
  2992. }
  2993. #if (_WIN32_IE >= 0x0300)
  2994. #define ListView_SetCheckState(hwndLV, i, fCheck) \
  2995. ListView_SetItemState(hwndLV, i, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), LVIS_STATEIMAGEMASK)
  2996. #endif
  2997. #define LVM_GETITEMSTATE (LVM_FIRST + 44)
  2998. #define ListView_GetItemState(hwndLV, i, mask) \
  2999. (UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), (LPARAM)(mask))
  3000. #if (_WIN32_IE >= 0x0300)
  3001. #define ListView_GetCheckState(hwndLV, i) \
  3002. ((((UINT)(SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), LVIS_STATEIMAGEMASK))) >> 12) -1)
  3003. #endif
  3004. #define LVM_GETITEMTEXTA (LVM_FIRST + 45)
  3005. #define LVM_GETITEMTEXTW (LVM_FIRST + 115)
  3006. #ifdef UNICODE
  3007. #define LVM_GETITEMTEXT LVM_GETITEMTEXTW
  3008. #else
  3009. #define LVM_GETITEMTEXT LVM_GETITEMTEXTA
  3010. #endif
  3011. #define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_) \
  3012. { LV_ITEM _ms_lvi;\
  3013. _ms_lvi.iSubItem = iSubItem_;\
  3014. _ms_lvi.cchTextMax = cchTextMax_;\
  3015. _ms_lvi.pszText = pszText_;\
  3016. SNDMSG((hwndLV), LVM_GETITEMTEXT, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
  3017. }
  3018. #define LVM_SETITEMTEXTA (LVM_FIRST + 46)
  3019. #define LVM_SETITEMTEXTW (LVM_FIRST + 116)
  3020. #ifdef UNICODE
  3021. #define LVM_SETITEMTEXT LVM_SETITEMTEXTW
  3022. #else
  3023. #define LVM_SETITEMTEXT LVM_SETITEMTEXTA
  3024. #endif
  3025. #define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_) \
  3026. { LV_ITEM _ms_lvi;\
  3027. _ms_lvi.iSubItem = iSubItem_;\
  3028. _ms_lvi.pszText = pszText_;\
  3029. SNDMSG((hwndLV), LVM_SETITEMTEXT, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
  3030. }
  3031. #if (_WIN32_IE >= 0x0300)
  3032. // these flags only apply to LVS_OWNERDATA listviews in report or list mode
  3033. #define LVSICF_NOINVALIDATEALL 0x00000001
  3034. #define LVSICF_NOSCROLL 0x00000002
  3035. #endif
  3036. #define LVM_SETITEMCOUNT (LVM_FIRST + 47)
  3037. #define ListView_SetItemCount(hwndLV, cItems) \
  3038. SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), 0)
  3039. #if (_WIN32_IE >= 0x0300)
  3040. #define ListView_SetItemCountEx(hwndLV, cItems, dwFlags) \
  3041. SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), (LPARAM)(dwFlags))
  3042. #endif
  3043. typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
  3044. #define LVM_SORTITEMS (LVM_FIRST + 48)
  3045. #define ListView_SortItems(hwndLV, _pfnCompare, _lPrm) \
  3046. (BOOL)SNDMSG((hwndLV), LVM_SORTITEMS, (WPARAM)(LPARAM)(_lPrm), \
  3047. (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
  3048. #define LVM_SETITEMPOSITION32 (LVM_FIRST + 49)
  3049. #define ListView_SetItemPosition32(hwndLV, i, x0, y0) \
  3050. { POINT ptNewPos; \
  3051. ptNewPos.x = x0; ptNewPos.y = y0; \
  3052. SNDMSG((hwndLV), LVM_SETITEMPOSITION32, (WPARAM)(int)(i), (LPARAM)&ptNewPos); \
  3053. }
  3054. #define LVM_GETSELECTEDCOUNT (LVM_FIRST + 50)
  3055. #define ListView_GetSelectedCount(hwndLV) \
  3056. (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, 0L)
  3057. #define LVM_GETITEMSPACING (LVM_FIRST + 51)
  3058. #define ListView_GetItemSpacing(hwndLV, fSmall) \
  3059. (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, fSmall, 0L)
  3060. #define LVM_GETISEARCHSTRINGA (LVM_FIRST + 52)
  3061. #define LVM_GETISEARCHSTRINGW (LVM_FIRST + 117)
  3062. #ifdef UNICODE
  3063. #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGW
  3064. #else
  3065. #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGA
  3066. #endif
  3067. #define ListView_GetISearchString(hwndLV, lpsz) \
  3068. (BOOL)SNDMSG((hwndLV), LVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))
  3069. #if (_WIN32_IE >= 0x0300)
  3070. #define LVM_SETICONSPACING (LVM_FIRST + 53)
  3071. // -1 for cx and cy means we'll use the default (system settings)
  3072. // 0 for cx or cy means use the current setting (allows you to change just one param)
  3073. #define ListView_SetIconSpacing(hwndLV, cx, cy) \
  3074. (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
  3075. #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 54) // optional wParam == mask
  3076. #define ListView_SetExtendedListViewStyle(hwndLV, dw)\
  3077. (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw)
  3078. #if (_WIN32_IE >= 0x0400)
  3079. #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw)\
  3080. (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw)
  3081. #endif
  3082. #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 55)
  3083. #define ListView_GetExtendedListViewStyle(hwndLV)\
  3084. (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
  3085. #define LVS_EX_GRIDLINES 0x00000001
  3086. #define LVS_EX_SUBITEMIMAGES 0x00000002
  3087. #define LVS_EX_CHECKBOXES 0x00000004
  3088. #define LVS_EX_TRACKSELECT 0x00000008
  3089. #define LVS_EX_HEADERDRAGDROP 0x00000010
  3090. #define LVS_EX_FULLROWSELECT 0x00000020 // applies to report mode only
  3091. #define LVS_EX_ONECLICKACTIVATE 0x00000040
  3092. #define LVS_EX_TWOCLICKACTIVATE 0x00000080
  3093. #if (_WIN32_IE >= 0x0400)
  3094. #define LVS_EX_FLATSB 0x00000100
  3095. #define LVS_EX_REGIONAL 0x00000200
  3096. #define LVS_EX_INFOTIP 0x00000400 // listview does InfoTips for you
  3097. #define LVS_EX_UNDERLINEHOT 0x00000800
  3098. #define LVS_EX_UNDERLINECOLD 0x00001000
  3099. #define LVS_EX_MULTIWORKAREAS 0x00002000
  3100. #endif
  3101. #if (_WIN32_IE >= 0x0500)
  3102. #define LVS_EX_LABELTIP 0x00004000 // listview unfolds partly hidden labels if it does not have infotip text
  3103. #define LVS_EX_BORDERSELECT 0x00008000 // border selection style instead of highlight
  3104. #endif // End (_WIN32_IE >= 0x0500)
  3105. #if (_WIN32_WINNT >= 0x501)
  3106. #define LVS_EX_DOUBLEBUFFER 0x00010000
  3107. #define LVS_EX_HIDELABELS 0x00020000
  3108. #define LVS_EX_SINGLEROW 0x00040000
  3109. #define LVS_EX_SNAPTOGRID 0x00080000 // Icons automatically snap to grid.
  3110. #define LVS_EX_SIMPLESELECT 0x00100000 // Also changes overlay rendering to top right for icon mode.
  3111. #endif
  3112. #define LVM_GETSUBITEMRECT (LVM_FIRST + 56)
  3113. #define ListView_GetSubItemRect(hwnd, iItem, iSubItem, code, prc) \
  3114. (BOOL)SNDMSG((hwnd), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
  3115. ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
  3116. #define LVM_SUBITEMHITTEST (LVM_FIRST + 57)
  3117. #define ListView_SubItemHitTest(hwnd, plvhti) \
  3118. (int)SNDMSG((hwnd), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
  3119. #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST + 58)
  3120. #define ListView_SetColumnOrderArray(hwnd, iCount, pi) \
  3121. (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))
  3122. #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST + 59)
  3123. #define ListView_GetColumnOrderArray(hwnd, iCount, pi) \
  3124. (BOOL)SNDMSG((hwnd), LVM_GETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))
  3125. #define LVM_SETHOTITEM (LVM_FIRST + 60)
  3126. #define ListView_SetHotItem(hwnd, i) \
  3127. (int)SNDMSG((hwnd), LVM_SETHOTITEM, (WPARAM)(i), 0)
  3128. #define LVM_GETHOTITEM (LVM_FIRST + 61)
  3129. #define ListView_GetHotItem(hwnd) \
  3130. (int)SNDMSG((hwnd), LVM_GETHOTITEM, 0, 0)
  3131. #define LVM_SETHOTCURSOR (LVM_FIRST + 62)
  3132. #define ListView_SetHotCursor(hwnd, hcur) \
  3133. (HCURSOR)SNDMSG((hwnd), LVM_SETHOTCURSOR, 0, (LPARAM)(hcur))
  3134. #define LVM_GETHOTCURSOR (LVM_FIRST + 63)
  3135. #define ListView_GetHotCursor(hwnd) \
  3136. (HCURSOR)SNDMSG((hwnd), LVM_GETHOTCURSOR, 0, 0)
  3137. #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST + 64)
  3138. #define ListView_ApproximateViewRect(hwnd, iWidth, iHeight, iCount) \
  3139. (DWORD)SNDMSG((hwnd), LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(iWidth, iHeight))
  3140. #endif // _WIN32_IE >= 0x0300
  3141. #if (_WIN32_IE >= 0x0400)
  3142. #define LV_MAX_WORKAREAS 16
  3143. #define LVM_SETWORKAREAS (LVM_FIRST + 65)
  3144. #define ListView_SetWorkAreas(hwnd, nWorkAreas, prc) \
  3145. (BOOL)SNDMSG((hwnd), LVM_SETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))
  3146. #define LVM_GETWORKAREAS (LVM_FIRST + 70)
  3147. #define ListView_GetWorkAreas(hwnd, nWorkAreas, prc) \
  3148. (BOOL)SNDMSG((hwnd), LVM_GETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))
  3149. #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST + 73)
  3150. #define ListView_GetNumberOfWorkAreas(hwnd, pnWorkAreas) \
  3151. (BOOL)SNDMSG((hwnd), LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)(UINT *)(pnWorkAreas))
  3152. #define LVM_GETSELECTIONMARK (LVM_FIRST + 66)
  3153. #define ListView_GetSelectionMark(hwnd) \
  3154. (int)SNDMSG((hwnd), LVM_GETSELECTIONMARK, 0, 0)
  3155. #define LVM_SETSELECTIONMARK (LVM_FIRST + 67)
  3156. #define ListView_SetSelectionMark(hwnd, i) \
  3157. (int)SNDMSG((hwnd), LVM_SETSELECTIONMARK, 0, (LPARAM)(i))
  3158. #define LVM_SETHOVERTIME (LVM_FIRST + 71)
  3159. #define ListView_SetHoverTime(hwndLV, dwHoverTimeMs)\
  3160. (DWORD)SNDMSG((hwndLV), LVM_SETHOVERTIME, 0, (LPARAM)(dwHoverTimeMs))
  3161. #define LVM_GETHOVERTIME (LVM_FIRST + 72)
  3162. #define ListView_GetHoverTime(hwndLV)\
  3163. (DWORD)SNDMSG((hwndLV), LVM_GETHOVERTIME, 0, 0)
  3164. #define LVM_SETTOOLTIPS (LVM_FIRST + 74)
  3165. #define ListView_SetToolTips(hwndLV, hwndNewHwnd)\
  3166. (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)(hwndNewHwnd), 0)
  3167. #define LVM_GETTOOLTIPS (LVM_FIRST + 78)
  3168. #define ListView_GetToolTips(hwndLV)\
  3169. (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0)
  3170. #define LVM_SORTITEMSEX (LVM_FIRST + 81)
  3171. #define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
  3172. (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
  3173. typedef struct tagLVBKIMAGEA
  3174. {
  3175. ULONG ulFlags; // LVBKIF_*
  3176. HBITMAP hbm;
  3177. LPSTR pszImage;
  3178. UINT cchImageMax;
  3179. int xOffsetPercent;
  3180. int yOffsetPercent;
  3181. } LVBKIMAGEA, *LPLVBKIMAGEA;
  3182. typedef struct tagLVBKIMAGEW
  3183. {
  3184. ULONG ulFlags; // LVBKIF_*
  3185. HBITMAP hbm;
  3186. LPWSTR pszImage;
  3187. UINT cchImageMax;
  3188. int xOffsetPercent;
  3189. int yOffsetPercent;
  3190. } LVBKIMAGEW, *LPLVBKIMAGEW;
  3191. #define LVBKIF_SOURCE_NONE 0x00000000
  3192. #define LVBKIF_SOURCE_HBITMAP 0x00000001
  3193. #define LVBKIF_SOURCE_URL 0x00000002
  3194. #define LVBKIF_SOURCE_MASK 0x00000003
  3195. #define LVBKIF_STYLE_NORMAL 0x00000000
  3196. #define LVBKIF_STYLE_TILE 0x00000010
  3197. #define LVBKIF_STYLE_MASK 0x00000010
  3198. #if (_WIN32_WINNT >= 0x501)
  3199. #define LVBKIF_FLAG_TILEOFFSET 0x00000100
  3200. #define LVBKIF_TYPE_WATERMARK 0x10000000
  3201. #endif
  3202. #define LVM_SETBKIMAGEA (LVM_FIRST + 68)
  3203. #define LVM_SETBKIMAGEW (LVM_FIRST + 138)
  3204. #define LVM_GETBKIMAGEA (LVM_FIRST + 69)
  3205. #define LVM_GETBKIMAGEW (LVM_FIRST + 139)
  3206. #if (_WIN32_WINNT >= 0x501)
  3207. #define LVM_SETSELECTEDCOLUMN (LVM_FIRST + 140)
  3208. #define ListView_SetSelectedColumn(hwnd, iCol) \
  3209. SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
  3210. #define LVM_SETTILEWIDTH (LVM_FIRST + 141)
  3211. #define ListView_SetTileWidth(hwnd, cpWidth) \
  3212. SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
  3213. #define LV_VIEW_ICON 0x0000
  3214. #define LV_VIEW_DETAILS 0x0001
  3215. #define LV_VIEW_SMALLICON 0x0002
  3216. #define LV_VIEW_LIST 0x0003
  3217. #define LV_VIEW_TILE 0x0004
  3218. #define LV_VIEW_MAX 0x0004
  3219. #define LVM_SETVIEW (LVM_FIRST + 142)
  3220. #define ListView_SetView(hwnd, iView) \
  3221. (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
  3222. #define LVM_GETVIEW (LVM_FIRST + 143)
  3223. #define ListView_GetView(hwnd) \
  3224. (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
  3225. #define LVGF_NONE 0x00000000
  3226. #define LVGF_HEADER 0x00000001
  3227. #define LVGF_FOOTER 0x00000002
  3228. #define LVGF_STATE 0x00000004
  3229. #define LVGF_ALIGN 0x00000008
  3230. #define LVGF_GROUPID 0x00000010
  3231. #define LVGS_NORMAL 0x00000000
  3232. #define LVGS_COLLAPSED 0x00000001
  3233. #define LVGS_HIDDEN 0x00000002
  3234. #define LVGA_HEADER_LEFT 0x00000001
  3235. #define LVGA_HEADER_CENTER 0x00000002
  3236. #define LVGA_HEADER_RIGHT 0x00000004 // Don't forget to validate exclusivity
  3237. #define LVGA_FOOTER_LEFT 0x00000008
  3238. #define LVGA_FOOTER_CENTER 0x00000010
  3239. #define LVGA_FOOTER_RIGHT 0x00000020 // Don't forget to validate exclusivity
  3240. typedef struct tagLVGROUP
  3241. {
  3242. UINT cbSize;
  3243. UINT mask;
  3244. LPWSTR pszHeader;
  3245. int cchHeader;
  3246. LPWSTR pszFooter;
  3247. int cchFooter;
  3248. int iGroupId;
  3249. UINT stateMask;
  3250. UINT state;
  3251. UINT uAlign;
  3252. } LVGROUP, *PLVGROUP;
  3253. #define LVM_INSERTGROUP (LVM_FIRST + 145)
  3254. #define ListView_InsertGroup(hwnd, index, pgrp) \
  3255. SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
  3256. #define LVM_SETGROUPINFO (LVM_FIRST + 147)
  3257. #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
  3258. SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
  3259. #define LVM_GETGROUPINFO (LVM_FIRST + 149)
  3260. #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
  3261. SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
  3262. #define LVM_REMOVEGROUP (LVM_FIRST + 150)
  3263. #define ListView_RemoveGroup(hwnd, iGroupId) \
  3264. SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
  3265. #define LVM_MOVEGROUP (LVM_FIRST + 151)
  3266. #define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
  3267. SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
  3268. #define LVM_MOVEITEMTOGROUP (LVM_FIRST + 154)
  3269. #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
  3270. SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
  3271. #define LVGMF_NONE 0x00000000
  3272. #define LVGMF_BORDERSIZE 0x00000001
  3273. #define LVGMF_BORDERCOLOR 0x00000002
  3274. #define LVGMF_TEXTCOLOR 0x00000004
  3275. typedef struct tagLVGROUPMETRICS
  3276. {
  3277. UINT cbSize;
  3278. UINT mask;
  3279. UINT Left;
  3280. UINT Top;
  3281. UINT Right;
  3282. UINT Bottom;
  3283. COLORREF crLeft;
  3284. COLORREF crTop;
  3285. COLORREF crRight;
  3286. COLORREF crBottom;
  3287. COLORREF crHeader;
  3288. COLORREF crFooter;
  3289. } LVGROUPMETRICS, *PLVGROUPMETRICS;
  3290. #define LVM_SETGROUPMETRICS (LVM_FIRST + 155)
  3291. #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
  3292. SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
  3293. #define LVM_GETGROUPMETRICS (LVM_FIRST + 156)
  3294. #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
  3295. SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
  3296. #define LVM_ENABLEGROUPVIEW (LVM_FIRST + 157)
  3297. #define ListView_EnableGroupView(hwnd, fEnable) \
  3298. SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
  3299. typedef int (CALLBACK *PFNLVGROUPCOMPARE)(int, int, void *);
  3300. #define LVM_SORTGROUPS (LVM_FIRST + 158)
  3301. #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
  3302. SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
  3303. typedef struct tagLVINSERTGROUPSORTED
  3304. {
  3305. PFNLVGROUPCOMPARE pfnGroupCompare;
  3306. void *pvData;
  3307. LVGROUP lvGroup;
  3308. }LVINSERTGROUPSORTED, *PLVINSERTGROUPSORTED;
  3309. #define LVM_INSERTGROUPSORTED (LVM_FIRST + 159)
  3310. #define ListView_InsertGroupSorted(hwnd, structInsert) \
  3311. SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
  3312. #define LVM_REMOVEALLGROUPS (LVM_FIRST + 160)
  3313. #define ListView_RemoveAllGroups(hwnd) \
  3314. SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
  3315. #define LVM_HASGROUP (LVM_FIRST + 161)
  3316. #define ListView_HasGroup(hwnd, dwGroupId) \
  3317. SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
  3318. #define LVTVIF_AUTOSIZE 0x00000000
  3319. #define LVTVIF_FIXEDWIDTH 0x00000001
  3320. #define LVTVIF_FIXEDHEIGHT 0x00000002
  3321. #define LVTVIF_FIXEDSIZE 0x00000003
  3322. #define LVTVIM_TILESIZE 0x00000001
  3323. #define LVTVIM_COLUMNS 0x00000002
  3324. #define LVTVIM_LABELMARGIN 0x00000004
  3325. typedef struct tagLVTILEVIEWINFO
  3326. {
  3327. UINT cbSize;
  3328. DWORD dwMask; //LVTVIM_*
  3329. DWORD dwFlags; //LVTVIF_*
  3330. SIZE sizeTile;
  3331. int cLines;
  3332. RECT rcLabelMargin;
  3333. } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
  3334. typedef struct tagLVTILEINFO
  3335. {
  3336. UINT cbSize;
  3337. int iItem;
  3338. UINT cColumns;
  3339. PUINT puColumns;
  3340. } LVTILEINFO, *PLVTILEINFO;
  3341. #define LVM_SETTILEVIEWINFO (LVM_FIRST + 162)
  3342. #define ListView_SetTileViewInfo(hwnd, ptvi) \
  3343. SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
  3344. #define LVM_GETTILEVIEWINFO (LVM_FIRST + 163)
  3345. #define ListView_GetTileViewInfo(hwnd, ptvi) \
  3346. SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
  3347. #define LVM_SETTILEINFO (LVM_FIRST + 164)
  3348. #define ListView_SetTileInfo(hwnd, pti) \
  3349. SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
  3350. #define LVM_GETTILEINFO (LVM_FIRST + 165)
  3351. #define ListView_GetTileInfo(hwnd, pti) \
  3352. SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
  3353. typedef struct
  3354. {
  3355. UINT cbSize;
  3356. DWORD dwFlags;
  3357. int iItem;
  3358. DWORD dwReserved;
  3359. } LVINSERTMARK, * LPLVINSERTMARK;
  3360. #define LVIM_AFTER 0x00000001 // TRUE = insert After iItem, otherwise before
  3361. #define LVM_SETINSERTMARK (LVM_FIRST + 166)
  3362. #define ListView_SetInsertMark(hwnd, lvim) \
  3363. (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
  3364. #define LVM_GETINSERTMARK (LVM_FIRST + 167)
  3365. #define ListView_GetInsertMark(hwnd, lvim) \
  3366. (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
  3367. #define LVM_INSERTMARKHITTEST (LVM_FIRST + 168)
  3368. #define ListView_InsertMarkHitTest(hwnd, point, lvim) \
  3369. (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
  3370. #define LVM_GETINSERTMARKRECT (LVM_FIRST + 169)
  3371. #define ListView_GetInsertMarkRect(hwnd, rc) \
  3372. (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
  3373. #define LVM_SETINSERTMARKCOLOR (LVM_FIRST + 170)
  3374. #define ListView_SetInsertMarkColor(hwnd, color) \
  3375. (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
  3376. #define LVM_GETINSERTMARKCOLOR (LVM_FIRST + 171)
  3377. #define ListView_GetInsertMarkColor(hwnd) \
  3378. (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
  3379. typedef struct tagLVSETINFOTIP
  3380. {
  3381. UINT cbSize;
  3382. DWORD dwFlags;
  3383. LPWSTR pszText;
  3384. int iItem;
  3385. int iSubItem;
  3386. } LVSETINFOTIP, *PLVSETINFOTIP;
  3387. #define LVM_SETINFOTIP (LVM_FIRST + 173)
  3388. #define ListView_SetInfoTip(hwndLV, plvInfoTip)\
  3389. (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
  3390. #define LVM_GETSELECTEDCOLUMN (LVM_FIRST + 174)
  3391. #define ListView_GetSelectedColumn(hwnd) \
  3392. (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
  3393. #define LVM_ISGROUPVIEWENABLED (LVM_FIRST + 175)
  3394. #define ListView_IsGroupViewEnabled(hwnd) \
  3395. (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
  3396. #define LVM_GETOUTLINECOLOR (LVM_FIRST + 176)
  3397. #define ListView_GetOutlineColor(hwnd) \
  3398. (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
  3399. #define LVM_SETOUTLINECOLOR (LVM_FIRST + 177)
  3400. #define ListView_SetOutlineColor(hwnd, color) \
  3401. (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
  3402. #define LVM_CANCELEDITLABEL (LVM_FIRST + 179)
  3403. #define ListView_CancelEditLabel(hwnd) \
  3404. (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
  3405. // These next to methods make it easy to identify an item that can be repositioned
  3406. // within listview. For example: Many developers use the lParam to store an identifier that is
  3407. // unique. Unfortunatly, in order to find this item, they have to iterate through all of the items
  3408. // in the listview. Listview will maintain a unique identifier. The upper bound is the size of a DWORD.
  3409. #define LVM_MAPINDEXTOID (LVM_FIRST + 180)
  3410. #define ListView_MapIndexToID(hwnd, index) \
  3411. (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
  3412. #define LVM_MAPIDTOINDEX (LVM_FIRST + 181)
  3413. #define ListView_MapIDToIndex(hwnd, id) \
  3414. (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
  3415. #endif
  3416. #ifdef UNICODE
  3417. #define LVBKIMAGE LVBKIMAGEW
  3418. #define LPLVBKIMAGE LPLVBKIMAGEW
  3419. #define LVM_SETBKIMAGE LVM_SETBKIMAGEW
  3420. #define LVM_GETBKIMAGE LVM_GETBKIMAGEW
  3421. #else
  3422. #define LVBKIMAGE LVBKIMAGEA
  3423. #define LPLVBKIMAGE LPLVBKIMAGEA
  3424. #define LVM_SETBKIMAGE LVM_SETBKIMAGEA
  3425. #define LVM_GETBKIMAGE LVM_GETBKIMAGEA
  3426. #endif
  3427. #define ListView_SetBkImage(hwnd, plvbki) \
  3428. (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)(plvbki))
  3429. #define ListView_GetBkImage(hwnd, plvbki) \
  3430. (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)(plvbki))
  3431. #endif // _WIN32_IE >= 0x0400
  3432. #if (_WIN32_IE >= 0x0300)
  3433. #define LPNM_LISTVIEW LPNMLISTVIEW
  3434. #define NM_LISTVIEW NMLISTVIEW
  3435. #else
  3436. #define tagNMLISTVIEW _NM_LISTVIEW
  3437. #define NMLISTVIEW NM_LISTVIEW
  3438. #define LPNMLISTVIEW LPNM_LISTVIEW
  3439. #endif
  3440. typedef struct tagNMLISTVIEW
  3441. {
  3442. NMHDR hdr;
  3443. int iItem;
  3444. int iSubItem;
  3445. UINT uNewState;
  3446. UINT uOldState;
  3447. UINT uChanged;
  3448. POINT ptAction;
  3449. LPARAM lParam;
  3450. } NMLISTVIEW, *LPNMLISTVIEW;
  3451. #if (_WIN32_IE >= 0x400)
  3452. // NMITEMACTIVATE is used instead of NMLISTVIEW in IE >= 0x400
  3453. // therefore all the fields are the same except for extra uKeyFlags
  3454. // they are used to store key flags at the time of the single click with
  3455. // delayed activation - because by the time the timer goes off a user may
  3456. // not hold the keys (shift, ctrl) any more
  3457. typedef struct tagNMITEMACTIVATE
  3458. {
  3459. NMHDR hdr;
  3460. int iItem;
  3461. int iSubItem;
  3462. UINT uNewState;
  3463. UINT uOldState;
  3464. UINT uChanged;
  3465. POINT ptAction;
  3466. LPARAM lParam;
  3467. UINT uKeyFlags;
  3468. } NMITEMACTIVATE, *LPNMITEMACTIVATE;
  3469. // key flags stored in uKeyFlags
  3470. #define LVKF_ALT 0x0001
  3471. #define LVKF_CONTROL 0x0002
  3472. #define LVKF_SHIFT 0x0004
  3473. #endif //(_WIN32_IE >= 0x0400)
  3474. #if (_WIN32_IE >= 0x0300)
  3475. #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW, clrTextBk)
  3476. typedef struct tagNMLVCUSTOMDRAW
  3477. {
  3478. NMCUSTOMDRAW nmcd;
  3479. COLORREF clrText;
  3480. COLORREF clrTextBk;
  3481. #if (_WIN32_IE >= 0x0400)
  3482. int iSubItem;
  3483. #endif
  3484. #if (_WIN32_WINNT >= 0x501)
  3485. DWORD dwItemType;
  3486. // Item custom draw
  3487. COLORREF clrFace;
  3488. int iIconEffect;
  3489. int iIconPhase;
  3490. int iPartId;
  3491. int iStateId;
  3492. // Group Custom Draw
  3493. RECT rcText;
  3494. UINT uAlign; // Alignment. Use LVGA_HEADER_CENTER, LVGA_HEADER_RIGHT, LVGA_HEADER_LEFT
  3495. #endif
  3496. } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
  3497. // dwItemType
  3498. #define LVCDI_ITEM 0x00000000
  3499. #define LVCDI_GROUP 0x00000001
  3500. // ListView custom draw return values
  3501. #define LVCDRF_NOSELECT 0x00010000
  3502. #define LVCDRF_NOGROUPFRAME 0x00020000
  3503. typedef struct tagNMLVCACHEHINT
  3504. {
  3505. NMHDR hdr;
  3506. int iFrom;
  3507. int iTo;
  3508. } NMLVCACHEHINT, *LPNMLVCACHEHINT;
  3509. #define LPNM_CACHEHINT LPNMLVCACHEHINT
  3510. #define PNM_CACHEHINT LPNMLVCACHEHINT
  3511. #define NM_CACHEHINT NMLVCACHEHINT
  3512. typedef struct tagNMLVFINDITEMA
  3513. {
  3514. NMHDR hdr;
  3515. int iStart;
  3516. LVFINDINFOA lvfi;
  3517. } NMLVFINDITEMA, *LPNMLVFINDITEMA;
  3518. typedef struct tagNMLVFINDITEMW
  3519. {
  3520. NMHDR hdr;
  3521. int iStart;
  3522. LVFINDINFOW lvfi;
  3523. } NMLVFINDITEMW, *LPNMLVFINDITEMW;
  3524. #define PNM_FINDITEMA LPNMLVFINDITEMA
  3525. #define LPNM_FINDITEMA LPNMLVFINDITEMA
  3526. #define NM_FINDITEMA NMLVFINDITEMA
  3527. #define PNM_FINDITEMW LPNMLVFINDITEMW
  3528. #define LPNM_FINDITEMW LPNMLVFINDITEMW
  3529. #define NM_FINDITEMW NMLVFINDITEMW
  3530. #ifdef UNICODE
  3531. #define PNM_FINDITEM PNM_FINDITEMW
  3532. #define LPNM_FINDITEM LPNM_FINDITEMW
  3533. #define NM_FINDITEM NM_FINDITEMW
  3534. #define NMLVFINDITEM NMLVFINDITEMW
  3535. #define LPNMLVFINDITEM LPNMLVFINDITEMW
  3536. #else
  3537. #define PNM_FINDITEM PNM_FINDITEMA
  3538. #define LPNM_FINDITEM LPNM_FINDITEMA
  3539. #define NM_FINDITEM NM_FINDITEMA
  3540. #define NMLVFINDITEM NMLVFINDITEMA
  3541. #define LPNMLVFINDITEM LPNMLVFINDITEMA
  3542. #endif
  3543. typedef struct tagNMLVODSTATECHANGE
  3544. {
  3545. NMHDR hdr;
  3546. int iFrom;
  3547. int iTo;
  3548. UINT uNewState;
  3549. UINT uOldState;
  3550. } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
  3551. #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
  3552. #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
  3553. #define NM_ODSTATECHANGE NMLVODSTATECHANGE
  3554. #endif // _WIN32_IE >= 0x0300
  3555. #define LVN_ITEMCHANGING (LVN_FIRST-0)
  3556. #define LVN_ITEMCHANGED (LVN_FIRST-1)
  3557. #define LVN_INSERTITEM (LVN_FIRST-2)
  3558. #define LVN_DELETEITEM (LVN_FIRST-3)
  3559. #define LVN_DELETEALLITEMS (LVN_FIRST-4)
  3560. #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
  3561. #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
  3562. #define LVN_ENDLABELEDITA (LVN_FIRST-6)
  3563. #define LVN_ENDLABELEDITW (LVN_FIRST-76)
  3564. #define LVN_COLUMNCLICK (LVN_FIRST-8)
  3565. #define LVN_BEGINDRAG (LVN_FIRST-9)
  3566. #define LVN_BEGINRDRAG (LVN_FIRST-11)
  3567. #if (_WIN32_IE >= 0x0300)
  3568. #define LVN_ODCACHEHINT (LVN_FIRST-13)
  3569. #define LVN_ODFINDITEMA (LVN_FIRST-52)
  3570. #define LVN_ODFINDITEMW (LVN_FIRST-79)
  3571. #define LVN_ITEMACTIVATE (LVN_FIRST-14)
  3572. #define LVN_ODSTATECHANGED (LVN_FIRST-15)
  3573. #ifdef UNICODE
  3574. #define LVN_ODFINDITEM LVN_ODFINDITEMW
  3575. #else
  3576. #define LVN_ODFINDITEM LVN_ODFINDITEMA
  3577. #endif
  3578. #endif // _WIN32_IE >= 0x0300
  3579. #if (_WIN32_IE >= 0x0400)
  3580. #define LVN_HOTTRACK (LVN_FIRST-21)
  3581. #endif
  3582. #define LVN_GETDISPINFOA (LVN_FIRST-50)
  3583. #define LVN_GETDISPINFOW (LVN_FIRST-77)
  3584. #define LVN_SETDISPINFOA (LVN_FIRST-51)
  3585. #define LVN_SETDISPINFOW (LVN_FIRST-78)
  3586. #ifdef UNICODE
  3587. #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW
  3588. #define LVN_ENDLABELEDIT LVN_ENDLABELEDITW
  3589. #define LVN_GETDISPINFO LVN_GETDISPINFOW
  3590. #define LVN_SETDISPINFO LVN_SETDISPINFOW
  3591. #else
  3592. #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITA
  3593. #define LVN_ENDLABELEDIT LVN_ENDLABELEDITA
  3594. #define LVN_GETDISPINFO LVN_GETDISPINFOA
  3595. #define LVN_SETDISPINFO LVN_SETDISPINFOA
  3596. #endif
  3597. #define LVIF_DI_SETITEM 0x1000
  3598. #if (_WIN32_IE >= 0x0300)
  3599. #define LV_DISPINFOA NMLVDISPINFOA
  3600. #define LV_DISPINFOW NMLVDISPINFOW
  3601. #else
  3602. #define tagLVDISPINFO _LV_DISPINFO
  3603. #define NMLVDISPINFOA LV_DISPINFOA
  3604. #define tagLVDISPINFOW _LV_DISPINFOW
  3605. #define NMLVDISPINFOW LV_DISPINFOW
  3606. #endif
  3607. #define LV_DISPINFO NMLVDISPINFO
  3608. typedef struct tagLVDISPINFO {
  3609. NMHDR hdr;
  3610. LVITEMA item;
  3611. } NMLVDISPINFOA, *LPNMLVDISPINFOA;
  3612. typedef struct tagLVDISPINFOW {
  3613. NMHDR hdr;
  3614. LVITEMW item;
  3615. } NMLVDISPINFOW, *LPNMLVDISPINFOW;
  3616. #ifdef UNICODE
  3617. #define NMLVDISPINFO NMLVDISPINFOW
  3618. #else
  3619. #define NMLVDISPINFO NMLVDISPINFOA
  3620. #endif
  3621. #define LVN_KEYDOWN (LVN_FIRST-55)
  3622. #if (_WIN32_IE >= 0x0300)
  3623. #define LV_KEYDOWN NMLVKEYDOWN
  3624. #else
  3625. #define tagLVKEYDOWN _LV_KEYDOWN
  3626. #define NMLVKEYDOWN LV_KEYDOWN
  3627. #endif
  3628. #ifdef _WIN32
  3629. #include <pshpack1.h>
  3630. #endif
  3631. typedef struct tagLVKEYDOWN
  3632. {
  3633. NMHDR hdr;
  3634. WORD wVKey;
  3635. UINT flags;
  3636. } NMLVKEYDOWN, *LPNMLVKEYDOWN;
  3637. #ifdef _WIN32
  3638. #include <poppack.h>
  3639. #endif
  3640. #if (_WIN32_IE >= 0x0300)
  3641. #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
  3642. #endif
  3643. #if (_WIN32_IE >= 0x0400)
  3644. typedef struct tagNMLVGETINFOTIPA
  3645. {
  3646. NMHDR hdr;
  3647. DWORD dwFlags;
  3648. LPSTR pszText;
  3649. int cchTextMax;
  3650. int iItem;
  3651. int iSubItem;
  3652. LPARAM lParam;
  3653. } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
  3654. typedef struct tagNMLVGETINFOTIPW
  3655. {
  3656. NMHDR hdr;
  3657. DWORD dwFlags;
  3658. LPWSTR pszText;
  3659. int cchTextMax;
  3660. int iItem;
  3661. int iSubItem;
  3662. LPARAM lParam;
  3663. } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
  3664. // NMLVGETINFOTIPA.dwFlag values
  3665. #define LVGIT_UNFOLDED 0x0001
  3666. #define LVN_GETINFOTIPA (LVN_FIRST-57)
  3667. #define LVN_GETINFOTIPW (LVN_FIRST-58)
  3668. #ifdef UNICODE
  3669. #define LVN_GETINFOTIP LVN_GETINFOTIPW
  3670. #define NMLVGETINFOTIP NMLVGETINFOTIPW
  3671. #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPW
  3672. #else
  3673. #define LVN_GETINFOTIP LVN_GETINFOTIPA
  3674. #define NMLVGETINFOTIP NMLVGETINFOTIPA
  3675. #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPA
  3676. #endif
  3677. #endif // _WIN32_IE >= 0x0400
  3678. #if (_WIN32_WINNT >= 0x501)
  3679. typedef struct tagNMLVSCROLL
  3680. {
  3681. NMHDR hdr;
  3682. int dx;
  3683. int dy;
  3684. } NMLVSCROLL, *LPNMLVSCROLL;
  3685. #define LVN_BEGINSCROLL (LVN_FIRST-80)
  3686. #define LVN_ENDSCROLL (LVN_FIRST-81)
  3687. #endif
  3688. #endif // NOLISTVIEW
  3689. //====== TREEVIEW CONTROL =====================================================
  3690. #ifndef NOTREEVIEW
  3691. #ifdef _WIN32
  3692. #define WC_TREEVIEWA "SysTreeView32"
  3693. #define WC_TREEVIEWW L"SysTreeView32"
  3694. #ifdef UNICODE
  3695. #define WC_TREEVIEW WC_TREEVIEWW
  3696. #else
  3697. #define WC_TREEVIEW WC_TREEVIEWA
  3698. #endif
  3699. #else
  3700. #define WC_TREEVIEW "SysTreeView"
  3701. #endif
  3702. // begin_r_commctrl
  3703. #define TVS_HASBUTTONS 0x0001
  3704. #define TVS_HASLINES 0x0002
  3705. #define TVS_LINESATROOT 0x0004
  3706. #define TVS_EDITLABELS 0x0008
  3707. #define TVS_DISABLEDRAGDROP 0x0010
  3708. #define TVS_SHOWSELALWAYS 0x0020
  3709. #if (_WIN32_IE >= 0x0300)
  3710. #define TVS_RTLREADING 0x0040
  3711. #define TVS_NOTOOLTIPS 0x0080
  3712. #define TVS_CHECKBOXES 0x0100
  3713. #define TVS_TRACKSELECT 0x0200
  3714. #if (_WIN32_IE >= 0x0400)
  3715. #define TVS_SINGLEEXPAND 0x0400
  3716. #define TVS_INFOTIP 0x0800
  3717. #define TVS_FULLROWSELECT 0x1000
  3718. #define TVS_NOSCROLL 0x2000
  3719. #define TVS_NONEVENHEIGHT 0x4000
  3720. #endif
  3721. #if (_WIN32_IE >= 0x500)
  3722. #define TVS_NOHSCROLL 0x8000 // TVS_NOSCROLL overrides this
  3723. #endif
  3724. #endif
  3725. // end_r_commctrl
  3726. typedef struct _TREEITEM *HTREEITEM;
  3727. #define TVIF_TEXT 0x0001
  3728. #define TVIF_IMAGE 0x0002
  3729. #define TVIF_PARAM 0x0004
  3730. #define TVIF_STATE 0x0008
  3731. #define TVIF_HANDLE 0x0010
  3732. #define TVIF_SELECTEDIMAGE 0x0020
  3733. #define TVIF_CHILDREN 0x0040
  3734. #if (_WIN32_IE >= 0x0400)
  3735. #define TVIF_INTEGRAL 0x0080
  3736. #endif
  3737. #define TVIS_SELECTED 0x0002
  3738. #define TVIS_CUT 0x0004
  3739. #define TVIS_DROPHILITED 0x0008
  3740. #define TVIS_BOLD 0x0010
  3741. #define TVIS_EXPANDED 0x0020
  3742. #define TVIS_EXPANDEDONCE 0x0040
  3743. #if (_WIN32_IE >= 0x0300)
  3744. #define TVIS_EXPANDPARTIAL 0x0080
  3745. #endif
  3746. #define TVIS_OVERLAYMASK 0x0F00
  3747. #define TVIS_STATEIMAGEMASK 0xF000
  3748. #define TVIS_USERMASK 0xF000
  3749. #define I_CHILDRENCALLBACK (-1)
  3750. #if (_WIN32_IE >= 0x0300)
  3751. #define LPTV_ITEMW LPTVITEMW
  3752. #define LPTV_ITEMA LPTVITEMA
  3753. #define TV_ITEMW TVITEMW
  3754. #define TV_ITEMA TVITEMA
  3755. #else
  3756. #define tagTVITEMA _TV_ITEMA
  3757. #define TVITEMA TV_ITEMA
  3758. #define LPTVITEMA LPTV_ITEMA
  3759. #define tagTVITEMW _TV_ITEMW
  3760. #define TVITEMW TV_ITEMW
  3761. #define LPTVITEMW LPTV_ITEMW
  3762. #endif
  3763. #define LPTV_ITEM LPTVITEM
  3764. #define TV_ITEM TVITEM
  3765. typedef struct tagTVITEMA {
  3766. UINT mask;
  3767. HTREEITEM hItem;
  3768. UINT state;
  3769. UINT stateMask;
  3770. LPSTR pszText;
  3771. int cchTextMax;
  3772. int iImage;
  3773. int iSelectedImage;
  3774. int cChildren;
  3775. LPARAM lParam;
  3776. } TVITEMA, *LPTVITEMA;
  3777. typedef struct tagTVITEMW {
  3778. UINT mask;
  3779. HTREEITEM hItem;
  3780. UINT state;
  3781. UINT stateMask;
  3782. LPWSTR pszText;
  3783. int cchTextMax;
  3784. int iImage;
  3785. int iSelectedImage;
  3786. int cChildren;
  3787. LPARAM lParam;
  3788. } TVITEMW, *LPTVITEMW;
  3789. #if (_WIN32_IE >= 0x0400)
  3790. // only used for Get and Set messages. no notifies
  3791. typedef struct tagTVITEMEXA {
  3792. UINT mask;
  3793. HTREEITEM hItem;
  3794. UINT state;
  3795. UINT stateMask;
  3796. LPSTR pszText;
  3797. int cchTextMax;
  3798. int iImage;
  3799. int iSelectedImage;
  3800. int cChildren;
  3801. LPARAM lParam;
  3802. int iIntegral;
  3803. } TVITEMEXA, *LPTVITEMEXA;
  3804. // only used for Get and Set messages. no notifies
  3805. typedef struct tagTVITEMEXW {
  3806. UINT mask;
  3807. HTREEITEM hItem;
  3808. UINT state;
  3809. UINT stateMask;
  3810. LPWSTR pszText;
  3811. int cchTextMax;
  3812. int iImage;
  3813. int iSelectedImage;
  3814. int cChildren;
  3815. LPARAM lParam;
  3816. int iIntegral;
  3817. } TVITEMEXW, *LPTVITEMEXW;
  3818. #ifdef UNICODE
  3819. typedef TVITEMEXW TVITEMEX;
  3820. typedef LPTVITEMEXW LPTVITEMEX;
  3821. #else
  3822. typedef TVITEMEXA TVITEMEX;
  3823. typedef LPTVITEMEXA LPTVITEMEX;
  3824. #endif // UNICODE
  3825. #endif
  3826. #ifdef UNICODE
  3827. #define TVITEM TVITEMW
  3828. #define LPTVITEM LPTVITEMW
  3829. #else
  3830. #define TVITEM TVITEMA
  3831. #define LPTVITEM LPTVITEMA
  3832. #endif
  3833. #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000)
  3834. #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0x0FFFF)
  3835. #define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0x0FFFE)
  3836. #define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0x0FFFD)
  3837. #if (_WIN32_IE >= 0x0300)
  3838. #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
  3839. #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
  3840. #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
  3841. #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
  3842. #else
  3843. #define tagTVINSERTSTRUCTA _TV_INSERTSTRUCTA
  3844. #define TVINSERTSTRUCTA TV_INSERTSTRUCTA
  3845. #define LPTVINSERTSTRUCTA LPTV_INSERTSTRUCTA
  3846. #define tagTVINSERTSTRUCTW _TV_INSERTSTRUCTW
  3847. #define TVINSERTSTRUCTW TV_INSERTSTRUCTW
  3848. #define LPTVINSERTSTRUCTW LPTV_INSERTSTRUCTW
  3849. #endif
  3850. #define TV_INSERTSTRUCT TVINSERTSTRUCT
  3851. #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
  3852. #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
  3853. #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
  3854. typedef struct tagTVINSERTSTRUCTA {
  3855. HTREEITEM hParent;
  3856. HTREEITEM hInsertAfter;
  3857. #if (_WIN32_IE >= 0x0400)
  3858. union
  3859. {
  3860. TVITEMEXA itemex;
  3861. TV_ITEMA item;
  3862. } DUMMYUNIONNAME;
  3863. #else
  3864. TV_ITEMA item;
  3865. #endif
  3866. } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
  3867. typedef struct tagTVINSERTSTRUCTW {
  3868. HTREEITEM hParent;
  3869. HTREEITEM hInsertAfter;
  3870. #if (_WIN32_IE >= 0x0400)
  3871. union
  3872. {
  3873. TVITEMEXW itemex;
  3874. TV_ITEMW item;
  3875. } DUMMYUNIONNAME;
  3876. #else
  3877. TV_ITEMW item;
  3878. #endif
  3879. } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
  3880. #ifdef UNICODE
  3881. #define TVINSERTSTRUCT TVINSERTSTRUCTW
  3882. #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTW
  3883. #define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTW_V1_SIZE
  3884. #else
  3885. #define TVINSERTSTRUCT TVINSERTSTRUCTA
  3886. #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTA
  3887. #define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTA_V1_SIZE
  3888. #endif
  3889. #define TVM_INSERTITEMA (TV_FIRST + 0)
  3890. #define TVM_INSERTITEMW (TV_FIRST + 50)
  3891. #ifdef UNICODE
  3892. #define TVM_INSERTITEM TVM_INSERTITEMW
  3893. #else
  3894. #define TVM_INSERTITEM TVM_INSERTITEMA
  3895. #endif
  3896. #define TreeView_InsertItem(hwnd, lpis) \
  3897. (HTREEITEM)SNDMSG((hwnd), TVM_INSERTITEM, 0, (LPARAM)(LPTV_INSERTSTRUCT)(lpis))
  3898. #define TVM_DELETEITEM (TV_FIRST + 1)
  3899. #define TreeView_DeleteItem(hwnd, hitem) \
  3900. (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hitem))
  3901. #define TreeView_DeleteAllItems(hwnd) \
  3902. (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
  3903. #define TVM_EXPAND (TV_FIRST + 2)
  3904. #define TreeView_Expand(hwnd, hitem, code) \
  3905. (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))
  3906. #define TVE_COLLAPSE 0x0001
  3907. #define TVE_EXPAND 0x0002
  3908. #define TVE_TOGGLE 0x0003
  3909. #if (_WIN32_IE >= 0x0300)
  3910. #define TVE_EXPANDPARTIAL 0x4000
  3911. #endif
  3912. #define TVE_COLLAPSERESET 0x8000
  3913. #define TVM_GETITEMRECT (TV_FIRST + 4)
  3914. #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
  3915. (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
  3916. #define TVM_GETCOUNT (TV_FIRST + 5)
  3917. #define TreeView_GetCount(hwnd) \
  3918. (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
  3919. #define TVM_GETINDENT (TV_FIRST + 6)
  3920. #define TreeView_GetIndent(hwnd) \
  3921. (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
  3922. #define TVM_SETINDENT (TV_FIRST + 7)
  3923. #define TreeView_SetIndent(hwnd, indent) \
  3924. (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)(indent), 0)
  3925. #define TVM_GETIMAGELIST (TV_FIRST + 8)
  3926. #define TreeView_GetImageList(hwnd, iImage) \
  3927. (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
  3928. #define TVSIL_NORMAL 0
  3929. #define TVSIL_STATE 2
  3930. #define TVM_SETIMAGELIST (TV_FIRST + 9)
  3931. #define TreeView_SetImageList(hwnd, himl, iImage) \
  3932. (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, (LPARAM)(HIMAGELIST)(himl))
  3933. #define TVM_GETNEXTITEM (TV_FIRST + 10)
  3934. #define TreeView_GetNextItem(hwnd, hitem, code) \
  3935. (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))
  3936. #define TVGN_ROOT 0x0000
  3937. #define TVGN_NEXT 0x0001
  3938. #define TVGN_PREVIOUS 0x0002
  3939. #define TVGN_PARENT 0x0003
  3940. #define TVGN_CHILD 0x0004
  3941. #define TVGN_FIRSTVISIBLE 0x0005
  3942. #define TVGN_NEXTVISIBLE 0x0006
  3943. #define TVGN_PREVIOUSVISIBLE 0x0007
  3944. #define TVGN_DROPHILITE 0x0008
  3945. #define TVGN_CARET 0x0009
  3946. #if (_WIN32_IE >= 0x0400)
  3947. #define TVGN_LASTVISIBLE 0x000A
  3948. #endif // _WIN32_IE >= 0x0400
  3949. #if (_WIN32_WINNT >= 0x501)
  3950. #define TVSI_NOSINGLEEXPAND 0x8000 // Should not conflict with TVGN flags.
  3951. #endif
  3952. #define TreeView_GetChild(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_CHILD)
  3953. #define TreeView_GetNextSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXT)
  3954. #define TreeView_GetPrevSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUS)
  3955. #define TreeView_GetParent(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PARENT)
  3956. #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
  3957. #define TreeView_GetNextVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTVISIBLE)
  3958. #define TreeView_GetPrevVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUSVISIBLE)
  3959. #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
  3960. #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
  3961. #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
  3962. #if (_WIN32_IE >= 0x0400)
  3963. #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
  3964. #endif // _WIN32_IE >= 0x0400
  3965. #define TVM_SELECTITEM (TV_FIRST + 11)
  3966. #define TreeView_Select(hwnd, hitem, code) \
  3967. (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))
  3968. #define TreeView_SelectItem(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_CARET)
  3969. #define TreeView_SelectDropTarget(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
  3970. #define TreeView_SelectSetFirstVisible(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
  3971. #define TVM_GETITEMA (TV_FIRST + 12)
  3972. #define TVM_GETITEMW (TV_FIRST + 62)
  3973. #ifdef UNICODE
  3974. #define TVM_GETITEM TVM_GETITEMW
  3975. #else
  3976. #define TVM_GETITEM TVM_GETITEMA
  3977. #endif
  3978. #define TreeView_GetItem(hwnd, pitem) \
  3979. (BOOL)SNDMSG((hwnd), TVM_GETITEM, 0, (LPARAM)(TV_ITEM *)(pitem))
  3980. #define TVM_SETITEMA (TV_FIRST + 13)
  3981. #define TVM_SETITEMW (TV_FIRST + 63)
  3982. #ifdef UNICODE
  3983. #define TVM_SETITEM TVM_SETITEMW
  3984. #else
  3985. #define TVM_SETITEM TVM_SETITEMA
  3986. #endif
  3987. #define TreeView_SetItem(hwnd, pitem) \
  3988. (BOOL)SNDMSG((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM *)(pitem))
  3989. #define TVM_EDITLABELA (TV_FIRST + 14)
  3990. #define TVM_EDITLABELW (TV_FIRST + 65)
  3991. #ifdef UNICODE
  3992. #define TVM_EDITLABEL TVM_EDITLABELW
  3993. #else
  3994. #define TVM_EDITLABEL TVM_EDITLABELA
  3995. #endif
  3996. #define TreeView_EditLabel(hwnd, hitem) \
  3997. (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
  3998. #define TVM_GETEDITCONTROL (TV_FIRST + 15)
  3999. #define TreeView_GetEditControl(hwnd) \
  4000. (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
  4001. #define TVM_GETVISIBLECOUNT (TV_FIRST + 16)
  4002. #define TreeView_GetVisibleCount(hwnd) \
  4003. (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
  4004. #define TVM_HITTEST (TV_FIRST + 17)
  4005. #define TreeView_HitTest(hwnd, lpht) \
  4006. (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0, (LPARAM)(LPTV_HITTESTINFO)(lpht))
  4007. #if (_WIN32_IE >= 0x0300)
  4008. #define LPTV_HITTESTINFO LPTVHITTESTINFO
  4009. #define TV_HITTESTINFO TVHITTESTINFO
  4010. #else
  4011. #define tagTVHITTESTINFO _TV_HITTESTINFO
  4012. #define TVHITTESTINFO TV_HITTESTINFO
  4013. #define LPTVHITTESTINFO LPTV_HITTESTINFO
  4014. #endif
  4015. typedef struct tagTVHITTESTINFO {
  4016. POINT pt;
  4017. UINT flags;
  4018. HTREEITEM hItem;
  4019. } TVHITTESTINFO, *LPTVHITTESTINFO;
  4020. #define TVHT_NOWHERE 0x0001
  4021. #define TVHT_ONITEMICON 0x0002
  4022. #define TVHT_ONITEMLABEL 0x0004
  4023. #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
  4024. #define TVHT_ONITEMINDENT 0x0008
  4025. #define TVHT_ONITEMBUTTON 0x0010
  4026. #define TVHT_ONITEMRIGHT 0x0020
  4027. #define TVHT_ONITEMSTATEICON 0x0040
  4028. #define TVHT_ABOVE 0x0100
  4029. #define TVHT_BELOW 0x0200
  4030. #define TVHT_TORIGHT 0x0400
  4031. #define TVHT_TOLEFT 0x0800
  4032. #define TVM_CREATEDRAGIMAGE (TV_FIRST + 18)
  4033. #define TreeView_CreateDragImage(hwnd, hitem) \
  4034. (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0, (LPARAM)(HTREEITEM)(hitem))
  4035. #define TVM_SORTCHILDREN (TV_FIRST + 19)
  4036. #define TreeView_SortChildren(hwnd, hitem, recurse) \
  4037. (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)(recurse), (LPARAM)(HTREEITEM)(hitem))
  4038. #define TVM_ENSUREVISIBLE (TV_FIRST + 20)
  4039. #define TreeView_EnsureVisible(hwnd, hitem) \
  4040. (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))
  4041. #define TVM_SORTCHILDRENCB (TV_FIRST + 21)
  4042. #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
  4043. (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)(recurse), \
  4044. (LPARAM)(LPTV_SORTCB)(psort))
  4045. #define TVM_ENDEDITLABELNOW (TV_FIRST + 22)
  4046. #define TreeView_EndEditLabelNow(hwnd, fCancel) \
  4047. (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)(fCancel), 0)
  4048. #define TVM_GETISEARCHSTRINGA (TV_FIRST + 23)
  4049. #define TVM_GETISEARCHSTRINGW (TV_FIRST + 64)
  4050. #ifdef UNICODE
  4051. #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW
  4052. #else
  4053. #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGA
  4054. #endif
  4055. #if (_WIN32_IE >= 0x0300)
  4056. #define TVM_SETTOOLTIPS (TV_FIRST + 24)
  4057. #define TreeView_SetToolTips(hwnd, hwndTT) \
  4058. (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
  4059. #define TVM_GETTOOLTIPS (TV_FIRST + 25)
  4060. #define TreeView_GetToolTips(hwnd) \
  4061. (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
  4062. #endif
  4063. #define TreeView_GetISearchString(hwndTV, lpsz) \
  4064. (BOOL)SNDMSG((hwndTV), TVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))
  4065. #if (_WIN32_IE >= 0x0400)
  4066. #define TVM_SETINSERTMARK (TV_FIRST + 26)
  4067. #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
  4068. (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM) (fAfter), (LPARAM) (hItem))
  4069. #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  4070. #define TreeView_SetUnicodeFormat(hwnd, fUnicode) \
  4071. (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
  4072. #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  4073. #define TreeView_GetUnicodeFormat(hwnd) \
  4074. (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)
  4075. #endif
  4076. #if (_WIN32_IE >= 0x0400)
  4077. #define TVM_SETITEMHEIGHT (TV_FIRST + 27)
  4078. #define TreeView_SetItemHeight(hwnd, iHeight) \
  4079. (int)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)(iHeight), 0)
  4080. #define TVM_GETITEMHEIGHT (TV_FIRST + 28)
  4081. #define TreeView_GetItemHeight(hwnd) \
  4082. (int)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
  4083. #define TVM_SETBKCOLOR (TV_FIRST + 29)
  4084. #define TreeView_SetBkColor(hwnd, clr) \
  4085. (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)(clr))
  4086. #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
  4087. #define TreeView_SetTextColor(hwnd, clr) \
  4088. (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)(clr))
  4089. #define TVM_GETBKCOLOR (TV_FIRST + 31)
  4090. #define TreeView_GetBkColor(hwnd) \
  4091. (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
  4092. #define TVM_GETTEXTCOLOR (TV_FIRST + 32)
  4093. #define TreeView_GetTextColor(hwnd) \
  4094. (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
  4095. #define TVM_SETSCROLLTIME (TV_FIRST + 33)
  4096. #define TreeView_SetScrollTime(hwnd, uTime) \
  4097. (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
  4098. #define TVM_GETSCROLLTIME (TV_FIRST + 34)
  4099. #define TreeView_GetScrollTime(hwnd) \
  4100. (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
  4101. #define TVM_SETINSERTMARKCOLOR (TV_FIRST + 37)
  4102. #define TreeView_SetInsertMarkColor(hwnd, clr) \
  4103. (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)(clr))
  4104. #define TVM_GETINSERTMARKCOLOR (TV_FIRST + 38)
  4105. #define TreeView_GetInsertMarkColor(hwnd) \
  4106. (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
  4107. #endif /* (_WIN32_IE >= 0x0400) */
  4108. #if (_WIN32_IE >= 0x0500)
  4109. // tvm_?etitemstate only uses mask, state and stateMask.
  4110. // so unicode or ansi is irrelevant.
  4111. #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
  4112. { TVITEM _ms_TVi;\
  4113. _ms_TVi.mask = TVIF_STATE; \
  4114. _ms_TVi.hItem = hti; \
  4115. _ms_TVi.stateMask = _mask;\
  4116. _ms_TVi.state = data;\
  4117. SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_ms_TVi);\
  4118. }
  4119. #define TreeView_SetCheckState(hwndTV, hti, fCheck) \
  4120. TreeView_SetItemState(hwndTV, hti, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), TVIS_STATEIMAGEMASK)
  4121. #define TVM_GETITEMSTATE (TV_FIRST + 39)
  4122. #define TreeView_GetItemState(hwndTV, hti, mask) \
  4123. (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
  4124. #define TreeView_GetCheckState(hwndTV, hti) \
  4125. ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), TVIS_STATEIMAGEMASK))) >> 12) -1)
  4126. #define TVM_SETLINECOLOR (TV_FIRST + 40)
  4127. #define TreeView_SetLineColor(hwnd, clr) \
  4128. (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
  4129. #define TVM_GETLINECOLOR (TV_FIRST + 41)
  4130. #define TreeView_GetLineColor(hwnd) \
  4131. (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
  4132. #endif
  4133. #if (_WIN32_WINNT >= 0x0501)
  4134. #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST + 42)
  4135. #define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
  4136. (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
  4137. #define TVM_MAPHTREEITEMTOACCID (TV_FIRST + 43)
  4138. #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
  4139. (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
  4140. #endif
  4141. typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
  4142. #if (_WIN32_IE >= 0x0300)
  4143. #define LPTV_SORTCB LPTVSORTCB
  4144. #define TV_SORTCB TVSORTCB
  4145. #else
  4146. #define tagTVSORTCB _TV_SORTCB
  4147. #define TVSORTCB TV_SORTCB
  4148. #define LPTVSORTCB LPTV_SORTCB
  4149. #endif
  4150. typedef struct tagTVSORTCB
  4151. {
  4152. HTREEITEM hParent;
  4153. PFNTVCOMPARE lpfnCompare;
  4154. LPARAM lParam;
  4155. } TVSORTCB, *LPTVSORTCB;
  4156. #if (_WIN32_IE >= 0x0300)
  4157. #define LPNM_TREEVIEWA LPNMTREEVIEWA
  4158. #define LPNM_TREEVIEWW LPNMTREEVIEWW
  4159. #define NM_TREEVIEWW NMTREEVIEWW
  4160. #define NM_TREEVIEWA NMTREEVIEWA
  4161. #else
  4162. #define tagNMTREEVIEWA _NM_TREEVIEWA
  4163. #define tagNMTREEVIEWW _NM_TREEVIEWW
  4164. #define NMTREEVIEWA NM_TREEVIEWA
  4165. #define NMTREEVIEWW NM_TREEVIEWW
  4166. #define LPNMTREEVIEWA LPNM_TREEVIEWA
  4167. #define LPNMTREEVIEWW LPNM_TREEVIEWW
  4168. #endif
  4169. #define LPNM_TREEVIEW LPNMTREEVIEW
  4170. #define NM_TREEVIEW NMTREEVIEW
  4171. typedef struct tagNMTREEVIEWA {
  4172. NMHDR hdr;
  4173. UINT action;
  4174. TVITEMA itemOld;
  4175. TVITEMA itemNew;
  4176. POINT ptDrag;
  4177. } NMTREEVIEWA, *LPNMTREEVIEWA;
  4178. typedef struct tagNMTREEVIEWW {
  4179. NMHDR hdr;
  4180. UINT action;
  4181. TVITEMW itemOld;
  4182. TVITEMW itemNew;
  4183. POINT ptDrag;
  4184. } NMTREEVIEWW, *LPNMTREEVIEWW;
  4185. #ifdef UNICODE
  4186. #define NMTREEVIEW NMTREEVIEWW
  4187. #define LPNMTREEVIEW LPNMTREEVIEWW
  4188. #else
  4189. #define NMTREEVIEW NMTREEVIEWA
  4190. #define LPNMTREEVIEW LPNMTREEVIEWA
  4191. #endif
  4192. #define TVN_SELCHANGINGA (TVN_FIRST-1)
  4193. #define TVN_SELCHANGINGW (TVN_FIRST-50)
  4194. #define TVN_SELCHANGEDA (TVN_FIRST-2)
  4195. #define TVN_SELCHANGEDW (TVN_FIRST-51)
  4196. #define TVC_UNKNOWN 0x0000
  4197. #define TVC_BYMOUSE 0x0001
  4198. #define TVC_BYKEYBOARD 0x0002
  4199. #define TVN_GETDISPINFOA (TVN_FIRST-3)
  4200. #define TVN_GETDISPINFOW (TVN_FIRST-52)
  4201. #define TVN_SETDISPINFOA (TVN_FIRST-4)
  4202. #define TVN_SETDISPINFOW (TVN_FIRST-53)
  4203. #define TVIF_DI_SETITEM 0x1000
  4204. #if (_WIN32_IE >= 0x0300)
  4205. #define TV_DISPINFOA NMTVDISPINFOA
  4206. #define TV_DISPINFOW NMTVDISPINFOW
  4207. #else
  4208. #define tagTVDISPINFOA _TV_DISPINFOA
  4209. #define NMTVDISPINFOA TV_DISPINFOA
  4210. #define tagTVDISPINFOW _TV_DISPINFOW
  4211. #define NMTVDISPINFOW TV_DISPINFOW
  4212. #endif
  4213. #define TV_DISPINFO NMTVDISPINFO
  4214. typedef struct tagTVDISPINFOA {
  4215. NMHDR hdr;
  4216. TVITEMA item;
  4217. } NMTVDISPINFOA, *LPNMTVDISPINFOA;
  4218. typedef struct tagTVDISPINFOW {
  4219. NMHDR hdr;
  4220. TVITEMW item;
  4221. } NMTVDISPINFOW, *LPNMTVDISPINFOW;
  4222. #ifdef UNICODE
  4223. #define NMTVDISPINFO NMTVDISPINFOW
  4224. #define LPNMTVDISPINFO LPNMTVDISPINFOW
  4225. #else
  4226. #define NMTVDISPINFO NMTVDISPINFOA
  4227. #define LPNMTVDISPINFO LPNMTVDISPINFOA
  4228. #endif
  4229. #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
  4230. #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
  4231. #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
  4232. #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
  4233. #define TVN_BEGINDRAGA (TVN_FIRST-7)
  4234. #define TVN_BEGINDRAGW (TVN_FIRST-56)
  4235. #define TVN_BEGINRDRAGA (TVN_FIRST-8)
  4236. #define TVN_BEGINRDRAGW (TVN_FIRST-57)
  4237. #define TVN_DELETEITEMA (TVN_FIRST-9)
  4238. #define TVN_DELETEITEMW (TVN_FIRST-58)
  4239. #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
  4240. #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
  4241. #define TVN_ENDLABELEDITA (TVN_FIRST-11)
  4242. #define TVN_ENDLABELEDITW (TVN_FIRST-60)
  4243. #define TVN_KEYDOWN (TVN_FIRST-12)
  4244. #if (_WIN32_IE >= 0x0400)
  4245. #define TVN_GETINFOTIPA (TVN_FIRST-13)
  4246. #define TVN_GETINFOTIPW (TVN_FIRST-14)
  4247. #define TVN_SINGLEEXPAND (TVN_FIRST-15)
  4248. #define TVNRET_DEFAULT 0
  4249. #define TVNRET_SKIPOLD 1
  4250. #define TVNRET_SKIPNEW 2
  4251. #endif // 0x400
  4252. #if (_WIN32_IE >= 0x0300)
  4253. #define TV_KEYDOWN NMTVKEYDOWN
  4254. #else
  4255. #define tagTVKEYDOWN _TV_KEYDOWN
  4256. #define NMTVKEYDOWN TV_KEYDOWN
  4257. #endif
  4258. #ifdef _WIN32
  4259. #include <pshpack1.h>
  4260. #endif
  4261. typedef struct tagTVKEYDOWN {
  4262. NMHDR hdr;
  4263. WORD wVKey;
  4264. UINT flags;
  4265. } NMTVKEYDOWN, *LPNMTVKEYDOWN;
  4266. #ifdef _WIN32
  4267. #include <poppack.h>
  4268. #endif
  4269. #ifdef UNICODE
  4270. #define TVN_SELCHANGING TVN_SELCHANGINGW
  4271. #define TVN_SELCHANGED TVN_SELCHANGEDW
  4272. #define TVN_GETDISPINFO TVN_GETDISPINFOW
  4273. #define TVN_SETDISPINFO TVN_SETDISPINFOW
  4274. #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGW
  4275. #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDW
  4276. #define TVN_BEGINDRAG TVN_BEGINDRAGW
  4277. #define TVN_BEGINRDRAG TVN_BEGINRDRAGW
  4278. #define TVN_DELETEITEM TVN_DELETEITEMW
  4279. #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW
  4280. #define TVN_ENDLABELEDIT TVN_ENDLABELEDITW
  4281. #else
  4282. #define TVN_SELCHANGING TVN_SELCHANGINGA
  4283. #define TVN_SELCHANGED TVN_SELCHANGEDA
  4284. #define TVN_GETDISPINFO TVN_GETDISPINFOA
  4285. #define TVN_SETDISPINFO TVN_SETDISPINFOA
  4286. #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGA
  4287. #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDA
  4288. #define TVN_BEGINDRAG TVN_BEGINDRAGA
  4289. #define TVN_BEGINRDRAG TVN_BEGINRDRAGA
  4290. #define TVN_DELETEITEM TVN_DELETEITEMA
  4291. #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITA
  4292. #define TVN_ENDLABELEDIT TVN_ENDLABELEDITA
  4293. #endif
  4294. #if (_WIN32_IE >= 0x0300)
  4295. #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
  4296. typedef struct tagNMTVCUSTOMDRAW
  4297. {
  4298. NMCUSTOMDRAW nmcd;
  4299. COLORREF clrText;
  4300. COLORREF clrTextBk;
  4301. #if (_WIN32_IE >= 0x0400)
  4302. int iLevel;
  4303. #endif
  4304. } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
  4305. #endif
  4306. #if (_WIN32_IE >= 0x0400)
  4307. // for tooltips
  4308. typedef struct tagNMTVGETINFOTIPA
  4309. {
  4310. NMHDR hdr;
  4311. LPSTR pszText;
  4312. int cchTextMax;
  4313. HTREEITEM hItem;
  4314. LPARAM lParam;
  4315. } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
  4316. typedef struct tagNMTVGETINFOTIPW
  4317. {
  4318. NMHDR hdr;
  4319. LPWSTR pszText;
  4320. int cchTextMax;
  4321. HTREEITEM hItem;
  4322. LPARAM lParam;
  4323. } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
  4324. #ifdef UNICODE
  4325. #define TVN_GETINFOTIP TVN_GETINFOTIPW
  4326. #define NMTVGETINFOTIP NMTVGETINFOTIPW
  4327. #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPW
  4328. #else
  4329. #define TVN_GETINFOTIP TVN_GETINFOTIPA
  4330. #define NMTVGETINFOTIP NMTVGETINFOTIPA
  4331. #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPA
  4332. #endif
  4333. // treeview's customdraw return meaning don't draw images. valid on CDRF_NOTIFYITEMPREPAINT
  4334. #define TVCDRF_NOIMAGES 0x00010000
  4335. #endif // _WIN32_IE >= 0x0400
  4336. #endif // NOTREEVIEW
  4337. #if (_WIN32_IE >= 0x0300)
  4338. #ifndef NOUSEREXCONTROLS
  4339. //////////////////// ComboBoxEx ////////////////////////////////
  4340. #define WC_COMBOBOXEXW L"ComboBoxEx32"
  4341. #define WC_COMBOBOXEXA "ComboBoxEx32"
  4342. #ifdef UNICODE
  4343. #define WC_COMBOBOXEX WC_COMBOBOXEXW
  4344. #else
  4345. #define WC_COMBOBOXEX WC_COMBOBOXEXA
  4346. #endif
  4347. #define CBEIF_TEXT 0x00000001
  4348. #define CBEIF_IMAGE 0x00000002
  4349. #define CBEIF_SELECTEDIMAGE 0x00000004
  4350. #define CBEIF_OVERLAY 0x00000008
  4351. #define CBEIF_INDENT 0x00000010
  4352. #define CBEIF_LPARAM 0x00000020
  4353. #define CBEIF_DI_SETITEM 0x10000000
  4354. typedef struct tagCOMBOBOXEXITEMA
  4355. {
  4356. UINT mask;
  4357. INT_PTR iItem;
  4358. LPSTR pszText;
  4359. int cchTextMax;
  4360. int iImage;
  4361. int iSelectedImage;
  4362. int iOverlay;
  4363. int iIndent;
  4364. LPARAM lParam;
  4365. } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
  4366. typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
  4367. typedef struct tagCOMBOBOXEXITEMW
  4368. {
  4369. UINT mask;
  4370. INT_PTR iItem;
  4371. LPWSTR pszText;
  4372. int cchTextMax;
  4373. int iImage;
  4374. int iSelectedImage;
  4375. int iOverlay;
  4376. int iIndent;
  4377. LPARAM lParam;
  4378. } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
  4379. typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
  4380. #ifdef UNICODE
  4381. #define COMBOBOXEXITEM COMBOBOXEXITEMW
  4382. #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW
  4383. #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW
  4384. #else
  4385. #define COMBOBOXEXITEM COMBOBOXEXITEMA
  4386. #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA
  4387. #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA
  4388. #endif
  4389. #define CBEM_INSERTITEMA (WM_USER + 1)
  4390. #define CBEM_SETIMAGELIST (WM_USER + 2)
  4391. #define CBEM_GETIMAGELIST (WM_USER + 3)
  4392. #define CBEM_GETITEMA (WM_USER + 4)
  4393. #define CBEM_SETITEMA (WM_USER + 5)
  4394. #define CBEM_DELETEITEM CB_DELETESTRING
  4395. #define CBEM_GETCOMBOCONTROL (WM_USER + 6)
  4396. #define CBEM_GETEDITCONTROL (WM_USER + 7)
  4397. #if (_WIN32_IE >= 0x0400)
  4398. #define CBEM_SETEXSTYLE (WM_USER + 8) // use SETEXTENDEDSTYLE instead
  4399. #define CBEM_SETEXTENDEDSTYLE (WM_USER + 14) // lparam == new style, wParam (optional) == mask
  4400. #define CBEM_GETEXSTYLE (WM_USER + 9) // use GETEXTENDEDSTYLE instead
  4401. #define CBEM_GETEXTENDEDSTYLE (WM_USER + 9)
  4402. #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  4403. #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  4404. #else
  4405. #define CBEM_SETEXSTYLE (WM_USER + 8)
  4406. #define CBEM_GETEXSTYLE (WM_USER + 9)
  4407. #endif
  4408. #define CBEM_HASEDITCHANGED (WM_USER + 10)
  4409. #define CBEM_INSERTITEMW (WM_USER + 11)
  4410. #define CBEM_SETITEMW (WM_USER + 12)
  4411. #define CBEM_GETITEMW (WM_USER + 13)
  4412. #ifdef UNICODE
  4413. #define CBEM_INSERTITEM CBEM_INSERTITEMW
  4414. #define CBEM_SETITEM CBEM_SETITEMW
  4415. #define CBEM_GETITEM CBEM_GETITEMW
  4416. #else
  4417. #define CBEM_INSERTITEM CBEM_INSERTITEMA
  4418. #define CBEM_SETITEM CBEM_SETITEMA
  4419. #define CBEM_GETITEM CBEM_GETITEMA
  4420. #endif
  4421. #if (_WIN32_WINNT >= 0x501)
  4422. #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
  4423. #endif
  4424. #define CBES_EX_NOEDITIMAGE 0x00000001
  4425. #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
  4426. #define CBES_EX_PATHWORDBREAKPROC 0x00000004
  4427. #if (_WIN32_IE >= 0x0400)
  4428. #define CBES_EX_NOSIZELIMIT 0x00000008
  4429. #define CBES_EX_CASESENSITIVE 0x00000010
  4430. typedef struct {
  4431. NMHDR hdr;
  4432. COMBOBOXEXITEMA ceItem;
  4433. } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
  4434. typedef struct {
  4435. NMHDR hdr;
  4436. COMBOBOXEXITEMW ceItem;
  4437. } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
  4438. #ifdef UNICODE
  4439. #define NMCOMBOBOXEX NMCOMBOBOXEXW
  4440. #define PNMCOMBOBOXEX PNMCOMBOBOXEXW
  4441. #define CBEN_GETDISPINFO CBEN_GETDISPINFOW
  4442. #else
  4443. #define NMCOMBOBOXEX NMCOMBOBOXEXA
  4444. #define PNMCOMBOBOXEX PNMCOMBOBOXEXA
  4445. #define CBEN_GETDISPINFO CBEN_GETDISPINFOA
  4446. #endif
  4447. #else
  4448. typedef struct {
  4449. NMHDR hdr;
  4450. COMBOBOXEXITEM ceItem;
  4451. } NMCOMBOBOXEX, *PNMCOMBOBOXEX;
  4452. #define CBEN_GETDISPINFO (CBEN_FIRST - 0)
  4453. #endif // _WIN32_IE >= 0x0400
  4454. #if (_WIN32_IE >= 0x0400)
  4455. #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
  4456. #endif
  4457. #define CBEN_INSERTITEM (CBEN_FIRST - 1)
  4458. #define CBEN_DELETEITEM (CBEN_FIRST - 2)
  4459. #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
  4460. #define CBEN_ENDEDITA (CBEN_FIRST - 5)
  4461. #define CBEN_ENDEDITW (CBEN_FIRST - 6)
  4462. #if (_WIN32_IE >= 0x0400)
  4463. #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
  4464. #endif
  4465. #if (_WIN32_IE >= 0x0400)
  4466. #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
  4467. #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
  4468. #ifdef UNICODE
  4469. #define CBEN_DRAGBEGIN CBEN_DRAGBEGINW
  4470. #else
  4471. #define CBEN_DRAGBEGIN CBEN_DRAGBEGINA
  4472. #endif
  4473. #endif //(_WIN32_IE >= 0x0400)
  4474. // lParam specifies why the endedit is happening
  4475. #ifdef UNICODE
  4476. #define CBEN_ENDEDIT CBEN_ENDEDITW
  4477. #else
  4478. #define CBEN_ENDEDIT CBEN_ENDEDITA
  4479. #endif
  4480. #define CBENF_KILLFOCUS 1
  4481. #define CBENF_RETURN 2
  4482. #define CBENF_ESCAPE 3
  4483. #define CBENF_DROPDOWN 4
  4484. #define CBEMAXSTRLEN 260
  4485. #if (_WIN32_IE >= 0x0400)
  4486. // CBEN_DRAGBEGIN sends this information ...
  4487. typedef struct {
  4488. NMHDR hdr;
  4489. int iItemid;
  4490. WCHAR szText[CBEMAXSTRLEN];
  4491. }NMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW;
  4492. typedef struct {
  4493. NMHDR hdr;
  4494. int iItemid;
  4495. char szText[CBEMAXSTRLEN];
  4496. }NMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA;
  4497. #ifdef UNICODE
  4498. #define NMCBEDRAGBEGIN NMCBEDRAGBEGINW
  4499. #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINW
  4500. #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINW
  4501. #else
  4502. #define NMCBEDRAGBEGIN NMCBEDRAGBEGINA
  4503. #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINA
  4504. #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINA
  4505. #endif
  4506. #endif // _WIN32_IE >= 0x0400
  4507. // CBEN_ENDEDIT sends this information...
  4508. // fChanged if the user actually did anything
  4509. // iNewSelection gives what would be the new selection unless the notify is failed
  4510. // iNewSelection may be CB_ERR if there's no match
  4511. typedef struct {
  4512. NMHDR hdr;
  4513. BOOL fChanged;
  4514. int iNewSelection;
  4515. WCHAR szText[CBEMAXSTRLEN];
  4516. int iWhy;
  4517. } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
  4518. typedef struct {
  4519. NMHDR hdr;
  4520. BOOL fChanged;
  4521. int iNewSelection;
  4522. char szText[CBEMAXSTRLEN];
  4523. int iWhy;
  4524. } NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
  4525. #ifdef UNICODE
  4526. #define NMCBEENDEDIT NMCBEENDEDITW
  4527. #define LPNMCBEENDEDIT LPNMCBEENDEDITW
  4528. #define PNMCBEENDEDIT PNMCBEENDEDITW
  4529. #else
  4530. #define NMCBEENDEDIT NMCBEENDEDITA
  4531. #define LPNMCBEENDEDIT LPNMCBEENDEDITA
  4532. #define PNMCBEENDEDIT PNMCBEENDEDITA
  4533. #endif
  4534. #endif
  4535. #endif // _WIN32_IE >= 0x0300
  4536. //====== TAB CONTROL ==========================================================
  4537. #ifndef NOTABCONTROL
  4538. #ifdef _WIN32
  4539. #define WC_TABCONTROLA "SysTabControl32"
  4540. #define WC_TABCONTROLW L"SysTabControl32"
  4541. #ifdef UNICODE
  4542. #define WC_TABCONTROL WC_TABCONTROLW
  4543. #else
  4544. #define WC_TABCONTROL WC_TABCONTROLA
  4545. #endif
  4546. #else
  4547. #define WC_TABCONTROL "SysTabControl"
  4548. #endif
  4549. // begin_r_commctrl
  4550. #if (_WIN32_IE >= 0x0300)
  4551. #define TCS_SCROLLOPPOSITE 0x0001 // assumes multiline tab
  4552. #define TCS_BOTTOM 0x0002
  4553. #define TCS_RIGHT 0x0002
  4554. #define TCS_MULTISELECT 0x0004 // allow multi-select in button mode
  4555. #endif
  4556. #if (_WIN32_IE >= 0x0400)
  4557. #define TCS_FLATBUTTONS 0x0008
  4558. #endif
  4559. #define TCS_FORCEICONLEFT 0x0010
  4560. #define TCS_FORCELABELLEFT 0x0020
  4561. #if (_WIN32_IE >= 0x0300)
  4562. #define TCS_HOTTRACK 0x0040
  4563. #define TCS_VERTICAL 0x0080
  4564. #endif
  4565. #define TCS_TABS 0x0000
  4566. #define TCS_BUTTONS 0x0100
  4567. #define TCS_SINGLELINE 0x0000
  4568. #define TCS_MULTILINE 0x0200
  4569. #define TCS_RIGHTJUSTIFY 0x0000
  4570. #define TCS_FIXEDWIDTH 0x0400
  4571. #define TCS_RAGGEDRIGHT 0x0800
  4572. #define TCS_FOCUSONBUTTONDOWN 0x1000
  4573. #define TCS_OWNERDRAWFIXED 0x2000
  4574. #define TCS_TOOLTIPS 0x4000
  4575. #define TCS_FOCUSNEVER 0x8000
  4576. // end_r_commctrl
  4577. #if (_WIN32_IE >= 0x0400)
  4578. // EX styles for use with TCM_SETEXTENDEDSTYLE
  4579. #define TCS_EX_FLATSEPARATORS 0x00000001
  4580. #define TCS_EX_REGISTERDROP 0x00000002
  4581. #endif
  4582. #define TCM_GETIMAGELIST (TCM_FIRST + 2)
  4583. #define TabCtrl_GetImageList(hwnd) \
  4584. (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)
  4585. #define TCM_SETIMAGELIST (TCM_FIRST + 3)
  4586. #define TabCtrl_SetImageList(hwnd, himl) \
  4587. (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(HIMAGELIST)(himl))
  4588. #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
  4589. #define TabCtrl_GetItemCount(hwnd) \
  4590. (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)
  4591. #define TCIF_TEXT 0x0001
  4592. #define TCIF_IMAGE 0x0002
  4593. #define TCIF_RTLREADING 0x0004
  4594. #define TCIF_PARAM 0x0008
  4595. #if (_WIN32_IE >= 0x0300)
  4596. #define TCIF_STATE 0x0010
  4597. #define TCIS_BUTTONPRESSED 0x0001
  4598. #endif
  4599. #if (_WIN32_IE >= 0x0400)
  4600. #define TCIS_HIGHLIGHTED 0x0002
  4601. #endif
  4602. #if (_WIN32_IE >= 0x0300)
  4603. #define TC_ITEMHEADERA TCITEMHEADERA
  4604. #define TC_ITEMHEADERW TCITEMHEADERW
  4605. #else
  4606. #define tagTCITEMHEADERA _TC_ITEMHEADERA
  4607. #define TCITEMHEADERA TC_ITEMHEADERA
  4608. #define tagTCITEMHEADERW _TC_ITEMHEADERW
  4609. #define TCITEMHEADERW TC_ITEMHEADERW
  4610. #endif
  4611. #define TC_ITEMHEADER TCITEMHEADER
  4612. typedef struct tagTCITEMHEADERA
  4613. {
  4614. UINT mask;
  4615. UINT lpReserved1;
  4616. UINT lpReserved2;
  4617. LPSTR pszText;
  4618. int cchTextMax;
  4619. int iImage;
  4620. } TCITEMHEADERA, *LPTCITEMHEADERA;
  4621. typedef struct tagTCITEMHEADERW
  4622. {
  4623. UINT mask;
  4624. UINT lpReserved1;
  4625. UINT lpReserved2;
  4626. LPWSTR pszText;
  4627. int cchTextMax;
  4628. int iImage;
  4629. } TCITEMHEADERW, *LPTCITEMHEADERW;
  4630. #ifdef UNICODE
  4631. #define TCITEMHEADER TCITEMHEADERW
  4632. #define LPTCITEMHEADER LPTCITEMHEADERW
  4633. #else
  4634. #define TCITEMHEADER TCITEMHEADERA
  4635. #define LPTCITEMHEADER LPTCITEMHEADERA
  4636. #endif
  4637. #if (_WIN32_IE >= 0x0300)
  4638. #define TC_ITEMA TCITEMA
  4639. #define TC_ITEMW TCITEMW
  4640. #else
  4641. #define tagTCITEMA _TC_ITEMA
  4642. #define TCITEMA TC_ITEMA
  4643. #define tagTCITEMW _TC_ITEMW
  4644. #define TCITEMW TC_ITEMW
  4645. #endif
  4646. #define TC_ITEM TCITEM
  4647. typedef struct tagTCITEMA
  4648. {
  4649. UINT mask;
  4650. #if (_WIN32_IE >= 0x0300)
  4651. DWORD dwState;
  4652. DWORD dwStateMask;
  4653. #else
  4654. UINT lpReserved1;
  4655. UINT lpReserved2;
  4656. #endif
  4657. LPSTR pszText;
  4658. int cchTextMax;
  4659. int iImage;
  4660. LPARAM lParam;
  4661. } TCITEMA, *LPTCITEMA;
  4662. typedef struct tagTCITEMW
  4663. {
  4664. UINT mask;
  4665. #if (_WIN32_IE >= 0x0300)
  4666. DWORD dwState;
  4667. DWORD dwStateMask;
  4668. #else
  4669. UINT lpReserved1;
  4670. UINT lpReserved2;
  4671. #endif
  4672. LPWSTR pszText;
  4673. int cchTextMax;
  4674. int iImage;
  4675. LPARAM lParam;
  4676. } TCITEMW, *LPTCITEMW;
  4677. #ifdef UNICODE
  4678. #define TCITEM TCITEMW
  4679. #define LPTCITEM LPTCITEMW
  4680. #else
  4681. #define TCITEM TCITEMA
  4682. #define LPTCITEM LPTCITEMA
  4683. #endif
  4684. #define TCM_GETITEMA (TCM_FIRST + 5)
  4685. #define TCM_GETITEMW (TCM_FIRST + 60)
  4686. #ifdef UNICODE
  4687. #define TCM_GETITEM TCM_GETITEMW
  4688. #else
  4689. #define TCM_GETITEM TCM_GETITEMA
  4690. #endif
  4691. #define TabCtrl_GetItem(hwnd, iItem, pitem) \
  4692. (BOOL)SNDMSG((hwnd), TCM_GETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))
  4693. #define TCM_SETITEMA (TCM_FIRST + 6)
  4694. #define TCM_SETITEMW (TCM_FIRST + 61)
  4695. #ifdef UNICODE
  4696. #define TCM_SETITEM TCM_SETITEMW
  4697. #else
  4698. #define TCM_SETITEM TCM_SETITEMA
  4699. #endif
  4700. #define TabCtrl_SetItem(hwnd, iItem, pitem) \
  4701. (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))
  4702. #define TCM_INSERTITEMA (TCM_FIRST + 7)
  4703. #define TCM_INSERTITEMW (TCM_FIRST + 62)
  4704. #ifdef UNICODE
  4705. #define TCM_INSERTITEM TCM_INSERTITEMW
  4706. #else
  4707. #define TCM_INSERTITEM TCM_INSERTITEMA
  4708. #endif
  4709. #define TabCtrl_InsertItem(hwnd, iItem, pitem) \
  4710. (int)SNDMSG((hwnd), TCM_INSERTITEM, (WPARAM)(int)(iItem), (LPARAM)(const TC_ITEM *)(pitem))
  4711. #define TCM_DELETEITEM (TCM_FIRST + 8)
  4712. #define TabCtrl_DeleteItem(hwnd, i) \
  4713. (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
  4714. #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
  4715. #define TabCtrl_DeleteAllItems(hwnd) \
  4716. (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)
  4717. #define TCM_GETITEMRECT (TCM_FIRST + 10)
  4718. #define TabCtrl_GetItemRect(hwnd, i, prc) \
  4719. (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
  4720. #define TCM_GETCURSEL (TCM_FIRST + 11)
  4721. #define TabCtrl_GetCurSel(hwnd) \
  4722. (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
  4723. #define TCM_SETCURSEL (TCM_FIRST + 12)
  4724. #define TabCtrl_SetCurSel(hwnd, i) \
  4725. (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)(i), 0)
  4726. #define TCHT_NOWHERE 0x0001
  4727. #define TCHT_ONITEMICON 0x0002
  4728. #define TCHT_ONITEMLABEL 0x0004
  4729. #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
  4730. #if (_WIN32_IE >= 0x0300)
  4731. #define LPTC_HITTESTINFO LPTCHITTESTINFO
  4732. #define TC_HITTESTINFO TCHITTESTINFO
  4733. #else
  4734. #define tagTCHITTESTINFO _TC_HITTESTINFO
  4735. #define TCHITTESTINFO TC_HITTESTINFO
  4736. #define LPTCHITTESTINFO LPTC_HITTESTINFO
  4737. #endif
  4738. typedef struct tagTCHITTESTINFO
  4739. {
  4740. POINT pt;
  4741. UINT flags;
  4742. } TCHITTESTINFO, *LPTCHITTESTINFO;
  4743. #define TCM_HITTEST (TCM_FIRST + 13)
  4744. #define TabCtrl_HitTest(hwndTC, pinfo) \
  4745. (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
  4746. #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
  4747. #define TabCtrl_SetItemExtra(hwndTC, cb) \
  4748. (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
  4749. #define TCM_ADJUSTRECT (TCM_FIRST + 40)
  4750. #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
  4751. (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)(bLarger), (LPARAM)(RECT *)prc)
  4752. #define TCM_SETITEMSIZE (TCM_FIRST + 41)
  4753. #define TabCtrl_SetItemSize(hwnd, x, y) \
  4754. (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
  4755. #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
  4756. #define TabCtrl_RemoveImage(hwnd, i) \
  4757. (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)
  4758. #define TCM_SETPADDING (TCM_FIRST + 43)
  4759. #define TabCtrl_SetPadding(hwnd, cx, cy) \
  4760. (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
  4761. #define TCM_GETROWCOUNT (TCM_FIRST + 44)
  4762. #define TabCtrl_GetRowCount(hwnd) \
  4763. (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)
  4764. #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
  4765. #define TabCtrl_GetToolTips(hwnd) \
  4766. (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)
  4767. #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
  4768. #define TabCtrl_SetToolTips(hwnd, hwndTT) \
  4769. (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)(hwndTT), 0L)
  4770. #define TCM_GETCURFOCUS (TCM_FIRST + 47)
  4771. #define TabCtrl_GetCurFocus(hwnd) \
  4772. (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
  4773. #define TCM_SETCURFOCUS (TCM_FIRST + 48)
  4774. #define TabCtrl_SetCurFocus(hwnd, i) \
  4775. SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
  4776. #if (_WIN32_IE >= 0x0300)
  4777. #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
  4778. #define TabCtrl_SetMinTabWidth(hwnd, x) \
  4779. (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
  4780. #define TCM_DESELECTALL (TCM_FIRST + 50)
  4781. #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
  4782. (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
  4783. #endif
  4784. #if (_WIN32_IE >= 0x0400)
  4785. #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
  4786. #define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
  4787. (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0))
  4788. #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52) // optional wParam == mask
  4789. #define TabCtrl_SetExtendedStyle(hwnd, dw)\
  4790. (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)
  4791. #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
  4792. #define TabCtrl_GetExtendedStyle(hwnd)\
  4793. (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
  4794. #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  4795. #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
  4796. (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
  4797. #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  4798. #define TabCtrl_GetUnicodeFormat(hwnd) \
  4799. (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
  4800. #endif // _WIN32_IE >= 0x0400
  4801. #define TCN_KEYDOWN (TCN_FIRST - 0)
  4802. #if (_WIN32_IE >= 0x0300)
  4803. #define TC_KEYDOWN NMTCKEYDOWN
  4804. #else
  4805. #define tagTCKEYDOWN _TC_KEYDOWN
  4806. #define NMTCKEYDOWN TC_KEYDOWN
  4807. #endif
  4808. #ifdef _WIN32
  4809. #include <pshpack1.h>
  4810. #endif
  4811. typedef struct tagTCKEYDOWN
  4812. {
  4813. NMHDR hdr;
  4814. WORD wVKey;
  4815. UINT flags;
  4816. } NMTCKEYDOWN;
  4817. #ifdef _WIN32
  4818. #include <poppack.h>
  4819. #endif
  4820. #define TCN_SELCHANGE (TCN_FIRST - 1)
  4821. #define TCN_SELCHANGING (TCN_FIRST - 2)
  4822. #if (_WIN32_IE >= 0x0400)
  4823. #define TCN_GETOBJECT (TCN_FIRST - 3)
  4824. #endif // _WIN32_IE >= 0x0400
  4825. #if (_WIN32_IE >= 0x0500)
  4826. #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
  4827. #endif // _WIN32_IE >= 0x0500
  4828. #endif // NOTABCONTROL
  4829. //====== ANIMATE CONTROL ======================================================
  4830. #ifndef NOANIMATE
  4831. #ifdef _WIN32
  4832. #define ANIMATE_CLASSW L"SysAnimate32"
  4833. #define ANIMATE_CLASSA "SysAnimate32"
  4834. #ifdef UNICODE
  4835. #define ANIMATE_CLASS ANIMATE_CLASSW
  4836. #else
  4837. #define ANIMATE_CLASS ANIMATE_CLASSA
  4838. #endif
  4839. // begin_r_commctrl
  4840. #define ACS_CENTER 0x0001
  4841. #define ACS_TRANSPARENT 0x0002
  4842. #define ACS_AUTOPLAY 0x0004
  4843. #if (_WIN32_IE >= 0x0300)
  4844. #define ACS_TIMER 0x0008 // don't use threads... use timers
  4845. #endif
  4846. // end_r_commctrl
  4847. #define ACM_OPENA (WM_USER+100)
  4848. #define ACM_OPENW (WM_USER+103)
  4849. #ifdef UNICODE
  4850. #define ACM_OPEN ACM_OPENW
  4851. #else
  4852. #define ACM_OPEN ACM_OPENA
  4853. #endif
  4854. #define ACM_PLAY (WM_USER+101)
  4855. #define ACM_STOP (WM_USER+102)
  4856. #define ACN_START 1
  4857. #define ACN_STOP 2
  4858. #define Animate_Create(hwndP, id, dwStyle, hInstance) \
  4859. CreateWindow(ANIMATE_CLASS, NULL, \
  4860. dwStyle, 0, 0, 0, 0, hwndP, (HMENU)(id), hInstance, NULL)
  4861. #define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
  4862. #define Animate_OpenEx(hwnd, hInst, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, (WPARAM)(hInst), (LPARAM)(LPTSTR)(szName))
  4863. #define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(rep), (LPARAM)MAKELONG(from, to))
  4864. #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
  4865. #define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
  4866. #define Animate_Seek(hwnd, frame) Animate_Play(hwnd, frame, frame, 1)
  4867. #endif
  4868. #endif // NOANIMATE
  4869. #if (_WIN32_IE >= 0x0300)
  4870. //====== MONTHCAL CONTROL ======================================================
  4871. #ifndef NOMONTHCAL
  4872. #ifdef _WIN32
  4873. #define MONTHCAL_CLASSW L"SysMonthCal32"
  4874. #define MONTHCAL_CLASSA "SysMonthCal32"
  4875. #ifdef UNICODE
  4876. #define MONTHCAL_CLASS MONTHCAL_CLASSW
  4877. #else
  4878. #define MONTHCAL_CLASS MONTHCAL_CLASSA
  4879. #endif
  4880. // bit-packed array of "bold" info for a month
  4881. // if a bit is on, that day is drawn bold
  4882. typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
  4883. #define MCM_FIRST 0x1000
  4884. // BOOL MonthCal_GetCurSel(HWND hmc, LPSYSTEMTIME pst)
  4885. // returns FALSE if MCS_MULTISELECT
  4886. // returns TRUE and sets *pst to the currently selected date otherwise
  4887. #define MCM_GETCURSEL (MCM_FIRST + 1)
  4888. #define MonthCal_GetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
  4889. // BOOL MonthCal_SetCurSel(HWND hmc, LPSYSTEMTIME pst)
  4890. // returns FALSE if MCS_MULTISELECT
  4891. // returns TURE and sets the currently selected date to *pst otherwise
  4892. #define MCM_SETCURSEL (MCM_FIRST + 2)
  4893. #define MonthCal_SetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
  4894. // DWORD MonthCal_GetMaxSelCount(HWND hmc)
  4895. // returns the maximum number of selectable days allowed
  4896. #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
  4897. #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
  4898. // BOOL MonthCal_SetMaxSelCount(HWND hmc, UINT n)
  4899. // sets the max number days that can be selected iff MCS_MULTISELECT
  4900. #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
  4901. #define MonthCal_SetMaxSelCount(hmc, n) (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
  4902. // BOOL MonthCal_GetSelRange(HWND hmc, LPSYSTEMTIME rgst)
  4903. // sets rgst[0] to the first day of the selection range
  4904. // sets rgst[1] to the last day of the selection range
  4905. #define MCM_GETSELRANGE (MCM_FIRST + 5)
  4906. #define MonthCal_GetSelRange(hmc, rgst) SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM)(rgst))
  4907. // BOOL MonthCal_SetSelRange(HWND hmc, LPSYSTEMTIME rgst)
  4908. // selects the range of days from rgst[0] to rgst[1]
  4909. #define MCM_SETSELRANGE (MCM_FIRST + 6)
  4910. #define MonthCal_SetSelRange(hmc, rgst) SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM)(rgst))
  4911. // DWORD MonthCal_GetMonthRange(HWND hmc, DWORD gmr, LPSYSTEMTIME rgst)
  4912. // if rgst specified, sets rgst[0] to the starting date and
  4913. // and rgst[1] to the ending date of the the selectable (non-grayed)
  4914. // days if GMR_VISIBLE or all the displayed days (including grayed)
  4915. // if GMR_DAYSTATE.
  4916. // returns the number of months spanned by the above range.
  4917. #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
  4918. #define MonthCal_GetMonthRange(hmc, gmr, rgst) (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
  4919. // BOOL MonthCal_SetDayState(HWND hmc, int cbds, DAYSTATE *rgds)
  4920. // cbds is the count of DAYSTATE items in rgds and it must be equal
  4921. // to the value returned from MonthCal_GetMonthRange(hmc, GMR_DAYSTATE, NULL)
  4922. // This sets the DAYSTATE bits for each month (grayed and non-grayed
  4923. // days) displayed in the calendar. The first bit in a month's DAYSTATE
  4924. // corresponts to bolding day 1, the second bit affects day 2, etc.
  4925. #define MCM_SETDAYSTATE (MCM_FIRST + 8)
  4926. #define MonthCal_SetDayState(hmc, cbds, rgds) SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
  4927. // BOOL MonthCal_GetMinReqRect(HWND hmc, LPRECT prc)
  4928. // sets *prc the minimal size needed to display one month
  4929. // To display two months, undo the AdjustWindowRect calculation already done to
  4930. // this rect, double the width, and redo the AdjustWindowRect calculation --
  4931. // the monthcal control will display two calendars in this window (if you also
  4932. // double the vertical size, you will get 4 calendars)
  4933. // NOTE: if you want to gurantee that the "Today" string is not clipped,
  4934. // get the MCM_GETMAXTODAYWIDTH and use the max of that width and this width
  4935. #define MCM_GETMINREQRECT (MCM_FIRST + 9)
  4936. #define MonthCal_GetMinReqRect(hmc, prc) SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
  4937. // set colors to draw control with -- see MCSC_ bits below
  4938. #define MCM_SETCOLOR (MCM_FIRST + 10)
  4939. #define MonthCal_SetColor(hmc, iColor, clr) SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
  4940. #define MCM_GETCOLOR (MCM_FIRST + 11)
  4941. #define MonthCal_GetColor(hmc, iColor) SNDMSG(hmc, MCM_GETCOLOR, iColor, 0)
  4942. #define MCSC_BACKGROUND 0 // the background color (between months)
  4943. #define MCSC_TEXT 1 // the dates
  4944. #define MCSC_TITLEBK 2 // background of the title
  4945. #define MCSC_TITLETEXT 3
  4946. #define MCSC_MONTHBK 4 // background within the month cal
  4947. #define MCSC_TRAILINGTEXT 5 // the text color of header & trailing days
  4948. // set what day is "today" send NULL to revert back to real date
  4949. #define MCM_SETTODAY (MCM_FIRST + 12)
  4950. #define MonthCal_SetToday(hmc, pst) SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)(pst))
  4951. // get what day is "today"
  4952. // returns BOOL for success/failure
  4953. #define MCM_GETTODAY (MCM_FIRST + 13)
  4954. #define MonthCal_GetToday(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)(pst))
  4955. // determine what pinfo->pt is over
  4956. #define MCM_HITTEST (MCM_FIRST + 14)
  4957. #define MonthCal_HitTest(hmc, pinfo) \
  4958. SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)(pinfo))
  4959. typedef struct {
  4960. UINT cbSize;
  4961. POINT pt;
  4962. UINT uHit; // out param
  4963. SYSTEMTIME st;
  4964. } MCHITTESTINFO, *PMCHITTESTINFO;
  4965. #define MCHT_TITLE 0x00010000
  4966. #define MCHT_CALENDAR 0x00020000
  4967. #define MCHT_TODAYLINK 0x00030000
  4968. #define MCHT_NEXT 0x01000000 // these indicate that hitting
  4969. #define MCHT_PREV 0x02000000 // here will go to the next/prev month
  4970. #define MCHT_NOWHERE 0x00000000
  4971. #define MCHT_TITLEBK (MCHT_TITLE)
  4972. #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
  4973. #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
  4974. #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
  4975. #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
  4976. #define MCHT_CALENDARBK (MCHT_CALENDAR)
  4977. #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
  4978. #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
  4979. #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
  4980. #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
  4981. #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
  4982. // set first day of week to iDay:
  4983. // 0 for Monday, 1 for Tuesday, ..., 6 for Sunday
  4984. // -1 for means use locale info
  4985. #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
  4986. #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
  4987. SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
  4988. // DWORD result... low word has the day. high word is bool if this is app set
  4989. // or not (FALSE == using locale info)
  4990. #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
  4991. #define MonthCal_GetFirstDayOfWeek(hmc) \
  4992. (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
  4993. // DWORD MonthCal_GetRange(HWND hmc, LPSYSTEMTIME rgst)
  4994. // modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
  4995. // modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
  4996. // returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
  4997. #define MCM_GETRANGE (MCM_FIRST + 17)
  4998. #define MonthCal_GetRange(hmc, rgst) \
  4999. (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
  5000. // BOOL MonthCal_SetRange(HWND hmc, DWORD gdtr, LPSYSTEMTIME rgst)
  5001. // if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
  5002. // if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
  5003. // returns TRUE on success, FALSE on error (such as invalid parameters)
  5004. #define MCM_SETRANGE (MCM_FIRST + 18)
  5005. #define MonthCal_SetRange(hmc, gd, rgst) \
  5006. (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
  5007. // int MonthCal_GetMonthDelta(HWND hmc)
  5008. // returns the number of months one click on a next/prev button moves by
  5009. #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
  5010. #define MonthCal_GetMonthDelta(hmc) \
  5011. (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
  5012. // int MonthCal_SetMonthDelta(HWND hmc, int n)
  5013. // sets the month delta to n. n==0 reverts to moving by a page of months
  5014. // returns the previous value of n.
  5015. #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
  5016. #define MonthCal_SetMonthDelta(hmc, n) \
  5017. (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
  5018. // DWORD MonthCal_GetMaxTodayWidth(HWND hmc, LPSIZE psz)
  5019. // sets *psz to the maximum width/height of the "Today" string displayed
  5020. // at the bottom of the calendar (as long as MCS_NOTODAY is not specified)
  5021. #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
  5022. #define MonthCal_GetMaxTodayWidth(hmc) \
  5023. (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
  5024. #if (_WIN32_IE >= 0x0400)
  5025. #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
  5026. #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
  5027. (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
  5028. #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
  5029. #define MonthCal_GetUnicodeFormat(hwnd) \
  5030. (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
  5031. #endif
  5032. // MCN_SELCHANGE is sent whenever the currently displayed date changes
  5033. // via month change, year change, keyboard navigation, prev/next button
  5034. //
  5035. typedef struct tagNMSELCHANGE
  5036. {
  5037. NMHDR nmhdr; // this must be first, so we don't break WM_NOTIFY
  5038. SYSTEMTIME stSelStart;
  5039. SYSTEMTIME stSelEnd;
  5040. } NMSELCHANGE, *LPNMSELCHANGE;
  5041. #define MCN_SELCHANGE (MCN_FIRST + 1)
  5042. // MCN_GETDAYSTATE is sent for MCS_DAYSTATE controls whenever new daystate
  5043. // information is needed (month or year scroll) to draw bolding information.
  5044. // The app must fill in cDayState months worth of information starting from
  5045. // stStart date. The app may fill in the array at prgDayState or change
  5046. // prgDayState to point to a different array out of which the information
  5047. // will be copied. (similar to tooltips)
  5048. //
  5049. typedef struct tagNMDAYSTATE
  5050. {
  5051. NMHDR nmhdr; // this must be first, so we don't break WM_NOTIFY
  5052. SYSTEMTIME stStart;
  5053. int cDayState;
  5054. LPMONTHDAYSTATE prgDayState; // points to cDayState MONTHDAYSTATEs
  5055. } NMDAYSTATE, *LPNMDAYSTATE;
  5056. #define MCN_GETDAYSTATE (MCN_FIRST + 3)
  5057. // MCN_SELECT is sent whenever a selection has occured (via mouse or keyboard)
  5058. //
  5059. typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
  5060. #define MCN_SELECT (MCN_FIRST + 4)
  5061. // begin_r_commctrl
  5062. #define MCS_DAYSTATE 0x0001
  5063. #define MCS_MULTISELECT 0x0002
  5064. #define MCS_WEEKNUMBERS 0x0004
  5065. #if (_WIN32_IE >= 0x0400)
  5066. #define MCS_NOTODAYCIRCLE 0x0008
  5067. #define MCS_NOTODAY 0x0010
  5068. #else
  5069. #define MCS_NOTODAY 0x0008
  5070. #endif
  5071. // end_r_commctrl
  5072. #define GMR_VISIBLE 0 // visible portion of display
  5073. #define GMR_DAYSTATE 1 // above plus the grayed out parts of
  5074. // partially displayed months
  5075. #endif // _WIN32
  5076. #endif // NOMONTHCAL
  5077. //====== DATETIMEPICK CONTROL ==================================================
  5078. #ifndef NODATETIMEPICK
  5079. #ifdef _WIN32
  5080. #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
  5081. #define DATETIMEPICK_CLASSA "SysDateTimePick32"
  5082. #ifdef UNICODE
  5083. #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
  5084. #else
  5085. #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
  5086. #endif
  5087. #define DTM_FIRST 0x1000
  5088. // DWORD DateTimePick_GetSystemtime(HWND hdp, LPSYSTEMTIME pst)
  5089. // returns GDT_NONE if "none" is selected (DTS_SHOWNONE only)
  5090. // returns GDT_VALID and modifies *pst to be the currently selected value
  5091. #define DTM_GETSYSTEMTIME (DTM_FIRST + 1)
  5092. #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))
  5093. // BOOL DateTime_SetSystemtime(HWND hdp, DWORD gd, LPSYSTEMTIME pst)
  5094. // if gd==GDT_NONE, sets datetimepick to None (DTS_SHOWNONE only)
  5095. // if gd==GDT_VALID, sets datetimepick to *pst
  5096. // returns TRUE on success, FALSE on error (such as bad params)
  5097. #define DTM_SETSYSTEMTIME (DTM_FIRST + 2)
  5098. #define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (WPARAM)(gd), (LPARAM)(pst))
  5099. // DWORD DateTime_GetRange(HWND hdp, LPSYSTEMTIME rgst)
  5100. // modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
  5101. // modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
  5102. // returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
  5103. #define DTM_GETRANGE (DTM_FIRST + 3)
  5104. #define DateTime_GetRange(hdp, rgst) (DWORD)SNDMSG(hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
  5105. // BOOL DateTime_SetRange(HWND hdp, DWORD gdtr, LPSYSTEMTIME rgst)
  5106. // if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
  5107. // if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
  5108. // returns TRUE on success, FALSE on error (such as invalid parameters)
  5109. #define DTM_SETRANGE (DTM_FIRST + 4)
  5110. #define DateTime_SetRange(hdp, gd, rgst) (BOOL)SNDMSG(hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
  5111. // BOOL DateTime_SetFormat(HWND hdp, LPCTSTR sz)
  5112. // sets the display formatting string to sz (see GetDateFormat and GetTimeFormat for valid formatting chars)
  5113. // NOTE: 'X' is a valid formatting character which indicates that the application
  5114. // will determine how to display information. Such apps must support DTN_WMKEYDOWN,
  5115. // DTN_FORMAT, and DTN_FORMATQUERY.
  5116. #define DTM_SETFORMATA (DTM_FIRST + 5)
  5117. #define DTM_SETFORMATW (DTM_FIRST + 50)
  5118. #ifdef UNICODE
  5119. #define DTM_SETFORMAT DTM_SETFORMATW
  5120. #else
  5121. #define DTM_SETFORMAT DTM_SETFORMATA
  5122. #endif
  5123. #define DateTime_SetFormat(hdp, sz) (BOOL)SNDMSG(hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
  5124. #define DTM_SETMCCOLOR (DTM_FIRST + 6)
  5125. #define DateTime_SetMonthCalColor(hdp, iColor, clr) SNDMSG(hdp, DTM_SETMCCOLOR, iColor, clr)
  5126. #define DTM_GETMCCOLOR (DTM_FIRST + 7)
  5127. #define DateTime_GetMonthCalColor(hdp, iColor) SNDMSG(hdp, DTM_GETMCCOLOR, iColor, 0)
  5128. // HWND DateTime_GetMonthCal(HWND hdp)
  5129. // returns the HWND of the MonthCal popup window. Only valid
  5130. // between DTN_DROPDOWN and DTN_CLOSEUP notifications.
  5131. #define DTM_GETMONTHCAL (DTM_FIRST + 8)
  5132. #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp, DTM_GETMONTHCAL, 0, 0)
  5133. #if (_WIN32_IE >= 0x0400)
  5134. #define DTM_SETMCFONT (DTM_FIRST + 9)
  5135. #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) SNDMSG(hdp, DTM_SETMCFONT, (WPARAM)(hfont), (LPARAM)(fRedraw))
  5136. #define DTM_GETMCFONT (DTM_FIRST + 10)
  5137. #define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp, DTM_GETMCFONT, 0, 0)
  5138. #endif // _WIN32_IE >= 0x0400
  5139. // begin_r_commctrl
  5140. #define DTS_UPDOWN 0x0001 // use UPDOWN instead of MONTHCAL
  5141. #define DTS_SHOWNONE 0x0002 // allow a NONE selection
  5142. #define DTS_SHORTDATEFORMAT 0x0000 // use the short date format (app must forward WM_WININICHANGE messages)
  5143. #define DTS_LONGDATEFORMAT 0x0004 // use the long date format (app must forward WM_WININICHANGE messages)
  5144. #if (_WIN32_IE >= 0x500)
  5145. #define DTS_SHORTDATECENTURYFORMAT 0x000C// short date format with century (app must forward WM_WININICHANGE messages)
  5146. #endif // (_WIN32_IE >= 0x500)
  5147. #define DTS_TIMEFORMAT 0x0009 // use the time format (app must forward WM_WININICHANGE messages)
  5148. #define DTS_APPCANPARSE 0x0010 // allow user entered strings (app MUST respond to DTN_USERSTRING)
  5149. #define DTS_RIGHTALIGN 0x0020 // right-align popup instead of left-align it
  5150. // end_r_commctrl
  5151. #define DTN_DATETIMECHANGE (DTN_FIRST + 1) // the systemtime has changed
  5152. typedef struct tagNMDATETIMECHANGE
  5153. {
  5154. NMHDR nmhdr;
  5155. DWORD dwFlags; // GDT_VALID or GDT_NONE
  5156. SYSTEMTIME st; // valid iff dwFlags==GDT_VALID
  5157. } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
  5158. #define DTN_USERSTRINGA (DTN_FIRST + 2) // the user has entered a string
  5159. #define DTN_USERSTRINGW (DTN_FIRST + 15)
  5160. typedef struct tagNMDATETIMESTRINGA
  5161. {
  5162. NMHDR nmhdr;
  5163. LPCSTR pszUserString; // string user entered
  5164. SYSTEMTIME st; // app fills this in
  5165. DWORD dwFlags; // GDT_VALID or GDT_NONE
  5166. } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
  5167. typedef struct tagNMDATETIMESTRINGW
  5168. {
  5169. NMHDR nmhdr;
  5170. LPCWSTR pszUserString; // string user entered
  5171. SYSTEMTIME st; // app fills this in
  5172. DWORD dwFlags; // GDT_VALID or GDT_NONE
  5173. } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
  5174. #ifdef UNICODE
  5175. #define DTN_USERSTRING DTN_USERSTRINGW
  5176. #define NMDATETIMESTRING NMDATETIMESTRINGW
  5177. #define LPNMDATETIMESTRING LPNMDATETIMESTRINGW
  5178. #else
  5179. #define DTN_USERSTRING DTN_USERSTRINGA
  5180. #define NMDATETIMESTRING NMDATETIMESTRINGA
  5181. #define LPNMDATETIMESTRING LPNMDATETIMESTRINGA
  5182. #endif
  5183. #define DTN_WMKEYDOWNA (DTN_FIRST + 3) // modify keydown on app format field (X)
  5184. #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
  5185. typedef struct tagNMDATETIMEWMKEYDOWNA
  5186. {
  5187. NMHDR nmhdr;
  5188. int nVirtKey; // virtual key code of WM_KEYDOWN which MODIFIES an X field
  5189. LPCSTR pszFormat; // format substring
  5190. SYSTEMTIME st; // current systemtime, app should modify based on key
  5191. } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
  5192. typedef struct tagNMDATETIMEWMKEYDOWNW
  5193. {
  5194. NMHDR nmhdr;
  5195. int nVirtKey; // virtual key code of WM_KEYDOWN which MODIFIES an X field
  5196. LPCWSTR pszFormat; // format substring
  5197. SYSTEMTIME st; // current systemtime, app should modify based on key
  5198. } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
  5199. #ifdef UNICODE
  5200. #define DTN_WMKEYDOWN DTN_WMKEYDOWNW
  5201. #define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNW
  5202. #define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNW
  5203. #else
  5204. #define DTN_WMKEYDOWN DTN_WMKEYDOWNA
  5205. #define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNA
  5206. #define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNA
  5207. #endif
  5208. #define DTN_FORMATA (DTN_FIRST + 4) // query display for app format field (X)
  5209. #define DTN_FORMATW (DTN_FIRST + 17)
  5210. typedef struct tagNMDATETIMEFORMATA
  5211. {
  5212. NMHDR nmhdr;
  5213. LPCSTR pszFormat; // format substring
  5214. SYSTEMTIME st; // current systemtime
  5215. LPCSTR pszDisplay; // string to display
  5216. CHAR szDisplay[64]; // buffer pszDisplay originally points at
  5217. } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
  5218. typedef struct tagNMDATETIMEFORMATW
  5219. {
  5220. NMHDR nmhdr;
  5221. LPCWSTR pszFormat; // format substring
  5222. SYSTEMTIME st; // current systemtime
  5223. LPCWSTR pszDisplay; // string to display
  5224. WCHAR szDisplay[64]; // buffer pszDisplay originally points at
  5225. } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
  5226. #ifdef UNICODE
  5227. #define DTN_FORMAT DTN_FORMATW
  5228. #define NMDATETIMEFORMAT NMDATETIMEFORMATW
  5229. #define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATW
  5230. #else
  5231. #define DTN_FORMAT DTN_FORMATA
  5232. #define NMDATETIMEFORMAT NMDATETIMEFORMATA
  5233. #define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATA
  5234. #endif
  5235. #define DTN_FORMATQUERYA (DTN_FIRST + 5) // query formatting info for app format field (X)
  5236. #define DTN_FORMATQUERYW (DTN_FIRST + 18)
  5237. typedef struct tagNMDATETIMEFORMATQUERYA
  5238. {
  5239. NMHDR nmhdr;
  5240. LPCSTR pszFormat; // format substring
  5241. SIZE szMax; // max bounding rectangle app will use for this format string
  5242. } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
  5243. typedef struct tagNMDATETIMEFORMATQUERYW
  5244. {
  5245. NMHDR nmhdr;
  5246. LPCWSTR pszFormat; // format substring
  5247. SIZE szMax; // max bounding rectangle app will use for this format string
  5248. } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
  5249. #ifdef UNICODE
  5250. #define DTN_FORMATQUERY DTN_FORMATQUERYW
  5251. #define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYW
  5252. #define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYW
  5253. #else
  5254. #define DTN_FORMATQUERY DTN_FORMATQUERYA
  5255. #define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYA
  5256. #define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYA
  5257. #endif
  5258. #define DTN_DROPDOWN (DTN_FIRST + 6) // MonthCal has dropped down
  5259. #define DTN_CLOSEUP (DTN_FIRST + 7) // MonthCal is popping up
  5260. #define GDTR_MIN 0x0001
  5261. #define GDTR_MAX 0x0002
  5262. #define GDT_ERROR -1
  5263. #define GDT_VALID 0
  5264. #define GDT_NONE 1
  5265. #endif // _WIN32
  5266. #endif // NODATETIMEPICK
  5267. #if (_WIN32_IE >= 0x0400)
  5268. #ifndef NOIPADDRESS
  5269. ///////////////////////////////////////////////
  5270. /// IP Address edit control
  5271. // Messages sent to IPAddress controls
  5272. #define IPM_CLEARADDRESS (WM_USER+100) // no parameters
  5273. #define IPM_SETADDRESS (WM_USER+101) // lparam = TCP/IP address
  5274. #define IPM_GETADDRESS (WM_USER+102) // lresult = # of non black fields. lparam = LPDWORD for TCP/IP address
  5275. #define IPM_SETRANGE (WM_USER+103) // wparam = field, lparam = range
  5276. #define IPM_SETFOCUS (WM_USER+104) // wparam = field
  5277. #define IPM_ISBLANK (WM_USER+105) // no parameters
  5278. #define WC_IPADDRESSW L"SysIPAddress32"
  5279. #define WC_IPADDRESSA "SysIPAddress32"
  5280. #ifdef UNICODE
  5281. #define WC_IPADDRESS WC_IPADDRESSW
  5282. #else
  5283. #define WC_IPADDRESS WC_IPADDRESSA
  5284. #endif
  5285. #define IPN_FIELDCHANGED (IPN_FIRST - 0)
  5286. typedef struct tagNMIPADDRESS
  5287. {
  5288. NMHDR hdr;
  5289. int iField;
  5290. int iValue;
  5291. } NMIPADDRESS, *LPNMIPADDRESS;
  5292. // The following is a useful macro for passing the range values in the
  5293. // IPM_SETRANGE message.
  5294. #define MAKEIPRANGE(low, high) ((LPARAM)(WORD)(((BYTE)(high) << 8) + (BYTE)(low)))
  5295. // And this is a useful macro for making the IP Address to be passed
  5296. // as a LPARAM.
  5297. #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
  5298. // Get individual number
  5299. #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
  5300. #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
  5301. #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
  5302. #define FOURTH_IPADDRESS(x) (x & 0xff)
  5303. #endif // NOIPADDRESS
  5304. //---------------------------------------------------------------------------------------
  5305. //---------------------------------------------------------------------------------------
  5306. /// ====================== Pager Control =============================
  5307. //---------------------------------------------------------------------------------------
  5308. //---------------------------------------------------------------------------------------
  5309. #ifndef NOPAGESCROLLER
  5310. //Pager Class Name
  5311. #define WC_PAGESCROLLERW L"SysPager"
  5312. #define WC_PAGESCROLLERA "SysPager"
  5313. #ifdef UNICODE
  5314. #define WC_PAGESCROLLER WC_PAGESCROLLERW
  5315. #else
  5316. #define WC_PAGESCROLLER WC_PAGESCROLLERA
  5317. #endif
  5318. //---------------------------------------------------------------------------------------
  5319. // Pager Control Styles
  5320. //---------------------------------------------------------------------------------------
  5321. // begin_r_commctrl
  5322. #define PGS_VERT 0x00000000
  5323. #define PGS_HORZ 0x00000001
  5324. #define PGS_AUTOSCROLL 0x00000002
  5325. #define PGS_DRAGNDROP 0x00000004
  5326. // end_r_commctrl
  5327. //---------------------------------------------------------------------------------------
  5328. // Pager Button State
  5329. //---------------------------------------------------------------------------------------
  5330. //The scroll can be in one of the following control State
  5331. #define PGF_INVISIBLE 0 // Scroll button is not visible
  5332. #define PGF_NORMAL 1 // Scroll button is in normal state
  5333. #define PGF_GRAYED 2 // Scroll button is in grayed state
  5334. #define PGF_DEPRESSED 4 // Scroll button is in depressed state
  5335. #define PGF_HOT 8 // Scroll button is in hot state
  5336. // The following identifiers specifies the button control
  5337. #define PGB_TOPORLEFT 0
  5338. #define PGB_BOTTOMORRIGHT 1
  5339. //---------------------------------------------------------------------------------------
  5340. // Pager Control Messages
  5341. //---------------------------------------------------------------------------------------
  5342. #define PGM_SETCHILD (PGM_FIRST + 1) // lParam == hwnd
  5343. #define Pager_SetChild(hwnd, hwndChild) \
  5344. (void)SNDMSG((hwnd), PGM_SETCHILD, 0, (LPARAM)(hwndChild))
  5345. #define PGM_RECALCSIZE (PGM_FIRST + 2)
  5346. #define Pager_RecalcSize(hwnd) \
  5347. (void)SNDMSG((hwnd), PGM_RECALCSIZE, 0, 0)
  5348. #define PGM_FORWARDMOUSE (PGM_FIRST + 3)
  5349. #define Pager_ForwardMouse(hwnd, bForward) \
  5350. (void)SNDMSG((hwnd), PGM_FORWARDMOUSE, (WPARAM)(bForward), 0)
  5351. #define PGM_SETBKCOLOR (PGM_FIRST + 4)
  5352. #define Pager_SetBkColor(hwnd, clr) \
  5353. (COLORREF)SNDMSG((hwnd), PGM_SETBKCOLOR, 0, (LPARAM)(clr))
  5354. #define PGM_GETBKCOLOR (PGM_FIRST + 5)
  5355. #define Pager_GetBkColor(hwnd) \
  5356. (COLORREF)SNDMSG((hwnd), PGM_GETBKCOLOR, 0, 0)
  5357. #define PGM_SETBORDER (PGM_FIRST + 6)
  5358. #define Pager_SetBorder(hwnd, iBorder) \
  5359. (int)SNDMSG((hwnd), PGM_SETBORDER, 0, (LPARAM)(iBorder))
  5360. #define PGM_GETBORDER (PGM_FIRST + 7)
  5361. #define Pager_GetBorder(hwnd) \
  5362. (int)SNDMSG((hwnd), PGM_GETBORDER, 0, 0)
  5363. #define PGM_SETPOS (PGM_FIRST + 8)
  5364. #define Pager_SetPos(hwnd, iPos) \
  5365. (int)SNDMSG((hwnd), PGM_SETPOS, 0, (LPARAM)(iPos))
  5366. #define PGM_GETPOS (PGM_FIRST + 9)
  5367. #define Pager_GetPos(hwnd) \
  5368. (int)SNDMSG((hwnd), PGM_GETPOS, 0, 0)
  5369. #define PGM_SETBUTTONSIZE (PGM_FIRST + 10)
  5370. #define Pager_SetButtonSize(hwnd, iSize) \
  5371. (int)SNDMSG((hwnd), PGM_SETBUTTONSIZE, 0, (LPARAM)(iSize))
  5372. #define PGM_GETBUTTONSIZE (PGM_FIRST + 11)
  5373. #define Pager_GetButtonSize(hwnd) \
  5374. (int)SNDMSG((hwnd), PGM_GETBUTTONSIZE, 0,0)
  5375. #define PGM_GETBUTTONSTATE (PGM_FIRST + 12)
  5376. #define Pager_GetButtonState(hwnd, iButton) \
  5377. (DWORD)SNDMSG((hwnd), PGM_GETBUTTONSTATE, 0, (LPARAM)(iButton))
  5378. #define PGM_GETDROPTARGET CCM_GETDROPTARGET
  5379. #define Pager_GetDropTarget(hwnd, ppdt) \
  5380. (void)SNDMSG((hwnd), PGM_GETDROPTARGET, 0, (LPARAM)(ppdt))
  5381. //---------------------------------------------------------------------------------------
  5382. //Pager Control Notification Messages
  5383. //---------------------------------------------------------------------------------------
  5384. // PGN_SCROLL Notification Message
  5385. #define PGN_SCROLL (PGN_FIRST-1)
  5386. #define PGF_SCROLLUP 1
  5387. #define PGF_SCROLLDOWN 2
  5388. #define PGF_SCROLLLEFT 4
  5389. #define PGF_SCROLLRIGHT 8
  5390. //Keys down
  5391. #define PGK_SHIFT 1
  5392. #define PGK_CONTROL 2
  5393. #define PGK_MENU 4
  5394. #ifdef _WIN32
  5395. #include <pshpack1.h>
  5396. #endif
  5397. // This structure is sent along with PGN_SCROLL notifications
  5398. typedef struct {
  5399. NMHDR hdr;
  5400. WORD fwKeys; // Specifies which keys are down when this notification is send
  5401. RECT rcParent; // Contains Parent Window Rect
  5402. int iDir; // Scrolling Direction
  5403. int iXpos; // Horizontal scroll position
  5404. int iYpos; // Vertical scroll position
  5405. int iScroll; // [in/out] Amount to scroll
  5406. }NMPGSCROLL, *LPNMPGSCROLL;
  5407. #ifdef _WIN32
  5408. #include <poppack.h>
  5409. #endif
  5410. // PGN_CALCSIZE Notification Message
  5411. #define PGN_CALCSIZE (PGN_FIRST-2)
  5412. #define PGF_CALCWIDTH 1
  5413. #define PGF_CALCHEIGHT 2
  5414. typedef struct {
  5415. NMHDR hdr;
  5416. DWORD dwFlag;
  5417. int iWidth;
  5418. int iHeight;
  5419. }NMPGCALCSIZE, *LPNMPGCALCSIZE;
  5420. // PGN_HOTITEMCHANGE Notification Message
  5421. #define PGN_HOTITEMCHANGE (PGN_FIRST-3)
  5422. /*
  5423. The PGN_HOTITEMCHANGE notification uses these notification
  5424. flags defined in TOOLBAR:
  5425. #define HICF_ENTERING 0x00000010 // idOld is invalid
  5426. #define HICF_LEAVING 0x00000020 // idNew is invalid
  5427. */
  5428. // Structure for PGN_HOTITEMCHANGE notification
  5429. //
  5430. typedef struct tagNMPGHOTITEM
  5431. {
  5432. NMHDR hdr;
  5433. int idOld;
  5434. int idNew;
  5435. DWORD dwFlags; // HICF_*
  5436. } NMPGHOTITEM, * LPNMPGHOTITEM;
  5437. #endif // NOPAGESCROLLER
  5438. ////====================== End Pager Control ==========================================
  5439. //
  5440. // === Native Font Control ===
  5441. //
  5442. #ifndef NONATIVEFONTCTL
  5443. //NativeFont Class Name
  5444. #define WC_NATIVEFONTCTLW L"NativeFontCtl"
  5445. #define WC_NATIVEFONTCTLA "NativeFontCtl"
  5446. #ifdef UNICODE
  5447. #define WC_NATIVEFONTCTL WC_NATIVEFONTCTLW
  5448. #else
  5449. #define WC_NATIVEFONTCTL WC_NATIVEFONTCTLA
  5450. #endif
  5451. // begin_r_commctrl
  5452. // style definition
  5453. #define NFS_EDIT 0x0001
  5454. #define NFS_STATIC 0x0002
  5455. #define NFS_LISTCOMBO 0x0004
  5456. #define NFS_BUTTON 0x0008
  5457. #define NFS_ALL 0x0010
  5458. #define NFS_USEFONTASSOC 0x0020
  5459. // end_r_commctrl
  5460. #endif // NONATIVEFONTCTL
  5461. // === End Native Font Control ===
  5462. /// ====================== Button Control =============================
  5463. #ifndef NOBUTTON
  5464. #ifdef _WIN32
  5465. // Button Class Name
  5466. #define WC_BUTTONA "Button"
  5467. #define WC_BUTTONW L"Button"
  5468. #ifdef UNICODE
  5469. #define WC_BUTTON WC_BUTTONW
  5470. #else
  5471. #define WC_BUTTON WC_BUTTONA
  5472. #endif
  5473. #else
  5474. #define WC_BUTTON "Button"
  5475. #endif
  5476. #if (_WIN32_WINNT >= 0x501)
  5477. #define BUTTON_IMAGELIST_ALIGN_LEFT 0
  5478. #define BUTTON_IMAGELIST_ALIGN_RIGHT 1
  5479. #define BUTTON_IMAGELIST_ALIGN_TOP 2
  5480. #define BUTTON_IMAGELIST_ALIGN_BOTTOM 3
  5481. #define BUTTON_IMAGELIST_ALIGN_CENTER 4 // Doesn't draw text
  5482. typedef struct
  5483. {
  5484. HIMAGELIST himl; // Index: Normal, hot pushed, disabled. If count is less than 4, we use index 1
  5485. RECT margin; // Margin around icon.
  5486. UINT uAlign;
  5487. } BUTTON_IMAGELIST, *PBUTTON_IMAGELIST;
  5488. #define BCM_GETIDEALSIZE (BCM_FIRST + 0x0001)
  5489. #define Button_GetIdealSize(hwnd, psize)\
  5490. (BOOL)SNDMSG((hwnd), BCM_GETIDEALSIZE, 0, (LPARAM)(psize))
  5491. #define BCM_SETIMAGELIST (BCM_FIRST + 0x0002)
  5492. #define Button_SetImageList(hwnd, pbuttonImagelist)\
  5493. (BOOL)SNDMSG((hwnd), BCM_SETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))
  5494. #define BCM_GETIMAGELIST (BCM_FIRST + 0x0003)
  5495. #define Button_GetImageList(hwnd, pbuttonImagelist)\
  5496. (BOOL)SNDMSG((hwnd), BCM_GETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))
  5497. #define BCM_SETTEXTMARGIN (BCM_FIRST + 0x0004)
  5498. #define Button_SetTextMargin(hwnd, pmargin)\
  5499. (BOOL)SNDMSG((hwnd), BCM_SETTEXTMARGIN, 0, (LPARAM)(pmargin))
  5500. #define BCM_GETTEXTMARGIN (BCM_FIRST + 0x0005)
  5501. #define Button_GetTextMargin(hwnd, pmargin)\
  5502. (BOOL)SNDMSG((hwnd), BCM_GETTEXTMARGIN, 0, (LPARAM)(pmargin))
  5503. typedef struct tagNMBCHOTITEM
  5504. {
  5505. NMHDR hdr;
  5506. DWORD dwFlags; // HICF_*
  5507. } NMBCHOTITEM, * LPNMBCHOTITEM;
  5508. #define BCN_HOTITEMCHANGE (BCN_FIRST + 0x0001)
  5509. #define BST_HOT 0x0200
  5510. #endif
  5511. #endif // NOBUTTON
  5512. /// ===================== End Button Control =========================
  5513. /// ====================== Static Control =============================
  5514. #ifndef NOSTATIC
  5515. #ifdef _WIN32
  5516. // Static Class Name
  5517. #define WC_STATICA "Static"
  5518. #define WC_STATICW L"Static"
  5519. #ifdef UNICODE
  5520. #define WC_STATIC WC_STATICW
  5521. #else
  5522. #define WC_STATIC WC_STATICA
  5523. #endif
  5524. #else
  5525. #define WC_STATIC "Static"
  5526. #endif
  5527. #endif // NOSTATIC
  5528. /// ===================== End Static Control =========================
  5529. /// ====================== Edit Control =============================
  5530. #ifndef NOEDIT
  5531. #ifdef _WIN32
  5532. // Edit Class Name
  5533. #define WC_EDITA "Edit"
  5534. #define WC_EDITW L"Edit"
  5535. #ifdef UNICODE
  5536. #define WC_EDIT WC_EDITW
  5537. #else
  5538. #define WC_EDIT WC_EDITA
  5539. #endif
  5540. #else
  5541. #define WC_EDIT "Edit"
  5542. #endif
  5543. #if (_WIN32_WINNT >= 0x501)
  5544. #define EM_SETCUEBANNER (ECM_FIRST + 1) // Set the cue banner with the lParm = LPCWSTR
  5545. #define Edit_SetCueBannerText(hwnd, lpcwText) \
  5546. (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(lpcwText))
  5547. #define EM_GETCUEBANNER (ECM_FIRST + 2) // Set the cue banner with the lParm = LPCWSTR
  5548. #define Edit_GetCueBannerText(hwnd, lpwText, cchText) \
  5549. (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(lpwText), (LPARAM)(cchText))
  5550. typedef struct _tagEDITBALLOONTIP
  5551. {
  5552. DWORD cbStruct;
  5553. LPCWSTR pszTitle;
  5554. LPCWSTR pszText;
  5555. INT ttiIcon; // From TTI_*
  5556. } EDITBALLOONTIP, *PEDITBALLOONTIP;
  5557. #define EM_SHOWBALLOONTIP (ECM_FIRST + 3) // Show a balloon tip associated to the edit control
  5558. #define Edit_ShowBalloonTip(hwnd, peditballoontip) \
  5559. (BOOL)SNDMSG((hwnd), EM_SHOWBALLOONTIP, 0, (LPARAM)(peditballoontip))
  5560. #define EM_HIDEBALLOONTIP (ECM_FIRST + 4) // Hide any balloon tip associated with the edit control
  5561. #define Edit_HideBalloonTip(hwnd) \
  5562. (BOOL)SNDMSG((hwnd), EM_HIDEBALLOONTIP, 0, 0)
  5563. #endif
  5564. #endif // NOEDIT
  5565. /// ===================== End Edit Control =========================
  5566. /// ====================== Listbox Control =============================
  5567. #ifndef NOLISTBOX
  5568. #ifdef _WIN32
  5569. // Listbox Class Name
  5570. #define WC_LISTBOXA "ListBox"
  5571. #define WC_LISTBOXW L"ListBox"
  5572. #ifdef UNICODE
  5573. #define WC_LISTBOX WC_LISTBOXW
  5574. #else
  5575. #define WC_LISTBOX WC_LISTBOXA
  5576. #endif
  5577. #else
  5578. #define WC_LISTBOX "ListBox"
  5579. #endif
  5580. #endif // NOLISTBOX
  5581. /// ===================== End Listbox Control =========================
  5582. /// ====================== Combobox Control =============================
  5583. #ifndef NOCOMBOBOX
  5584. #ifdef _WIN32
  5585. // Combobox Class Name
  5586. #define WC_COMBOBOXA "ComboBox"
  5587. #define WC_COMBOBOXW L"ComboBox"
  5588. #ifdef UNICODE
  5589. #define WC_COMBOBOX WC_COMBOBOXW
  5590. #else
  5591. #define WC_COMBOBOX WC_COMBOBOXA
  5592. #endif
  5593. #else
  5594. #define WC_COMBOBOX "ComboBox"
  5595. #endif
  5596. #endif // NOCOMBOBOX
  5597. #if (_WIN32_WINNT >= 0x501)
  5598. // custom combobox control messages
  5599. #define CB_SETMINVISIBLE (CBM_FIRST + 1)
  5600. #define CB_GETMINVISIBLE (CBM_FIRST + 2)
  5601. #define ComboBox_SetMinVisible(hwnd, iMinVisible) \
  5602. (BOOL)SNDMSG((hwnd), CB_SETMINVISIBLE, (WPARAM)iMinVisible, 0)
  5603. #define ComboBox_GetMinVisible(hwnd) \
  5604. (int)SNDMSG((hwnd), CB_GETMINVISIBLE, 0, 0)
  5605. #endif
  5606. /// ===================== End Combobox Control =========================
  5607. /// ====================== Scrollbar Control ============================
  5608. #ifndef NOSCROLLBAR
  5609. #ifdef _WIN32
  5610. // Scrollbar Class Name
  5611. #define WC_SCROLLBARA "ScrollBar"
  5612. #define WC_SCROLLBARW L"ScrollBar"
  5613. #ifdef UNICODE
  5614. #define WC_SCROLLBAR WC_SCROLLBARW
  5615. #else
  5616. #define WC_SCROLLBAR WC_SCROLLBARA
  5617. #endif
  5618. #else
  5619. #define WC_SCROLLBAR "ScrollBar"
  5620. #endif
  5621. #endif // NOSCROLLBAR
  5622. /// ===================== End Scrollbar Control =========================
  5623. //====== SysLink control =========================================
  5624. #ifdef _WIN32
  5625. #if (_WIN32_WINNT >= 0x501)
  5626. #define INVALID_LINK_INDEX (-1)
  5627. #define MAX_LINKID_TEXT 48
  5628. #define L_MAX_URL_LENGTH (2048 + 32 + sizeof("://"))
  5629. #define WC_LINK L"SysLink"
  5630. #define LWS_TRANSPARENT 0x0001
  5631. #define LWS_IGNORERETURN 0x0002
  5632. #define LIF_ITEMINDEX 0x00000001
  5633. #define LIF_STATE 0x00000002
  5634. #define LIF_ITEMID 0x00000004
  5635. #define LIF_URL 0x00000008
  5636. #define LIS_FOCUSED 0x00000001
  5637. #define LIS_ENABLED 0x00000002
  5638. #define LIS_VISITED 0x00000004
  5639. typedef struct tagLITEM
  5640. {
  5641. UINT mask ;
  5642. int iLink ;
  5643. UINT state ;
  5644. UINT stateMask ;
  5645. WCHAR szID[MAX_LINKID_TEXT] ;
  5646. WCHAR szUrl[L_MAX_URL_LENGTH] ;
  5647. } LITEM, * PLITEM ;
  5648. typedef struct tagLHITTESTINFO
  5649. {
  5650. POINT pt ;
  5651. LITEM item ;
  5652. } LHITTESTINFO, *PLHITTESTINFO ;
  5653. typedef struct tagNMLINK
  5654. {
  5655. NMHDR hdr;
  5656. LITEM item ;
  5657. } NMLINK, *PNMLINK;
  5658. // SysLink notifications
  5659. // NM_CLICK // wParam: control ID, lParam: PNMLINK, ret: ignored.
  5660. // LinkWindow messages
  5661. #define LM_HITTEST (WM_USER+0x300) // wParam: n/a, lparam: PLHITTESTINFO, ret: BOOL
  5662. #define LM_GETIDEALHEIGHT (WM_USER+0x301) // wParam: n/a, lparam: n/a, ret: cy
  5663. #define LM_SETITEM (WM_USER+0x302) // wParam: n/a, lparam: LITEM*, ret: BOOL
  5664. #define LM_GETITEM (WM_USER+0x303) // wParam: n/a, lparam: LITEM*, ret: BOOL
  5665. #endif
  5666. #endif // _WIN32
  5667. //====== End SysLink control =========================================
  5668. //
  5669. // === MUI APIs ===
  5670. //
  5671. #ifndef NOMUI
  5672. void WINAPI InitMUILanguage(LANGID uiLang);
  5673. LANGID WINAPI GetMUILanguage(void);
  5674. #endif // NOMUI
  5675. #endif // _WIN32_IE >= 0x0400
  5676. #define DA_LAST (0x7FFFFFFF)
  5677. #define DPA_APPEND (0x7fffffff)
  5678. #define DPA_ERR (-1)
  5679. #define DSA_APPEND (0x7fffffff)
  5680. #define DSA_ERR (-1)
  5681. // Dynamic structure array
  5682. typedef struct _DSA *HDSA;
  5683. typedef int (CALLBACK *PFNDPAENUMCALLBACK)(void *p, void *pData);
  5684. typedef int (CALLBACK *PFNDSAENUMCALLBACK)(void *p, void *pData);
  5685. WINCOMMCTRLAPI HDSA WINAPI DSA_Create(int cbItem, int cItemGrow);
  5686. WINCOMMCTRLAPI BOOL WINAPI DSA_Destroy(HDSA hdsa);
  5687. WINCOMMCTRLAPI void WINAPI DSA_DestroyCallback(HDSA hdsa, PFNDSAENUMCALLBACK pfnCB, void *pData);
  5688. WINCOMMCTRLAPI PVOID WINAPI DSA_GetItemPtr(HDSA hdsa, int i);
  5689. WINCOMMCTRLAPI int WINAPI DSA_InsertItem(HDSA hdsa, int i, void *pitem);
  5690. // Dynamic pointer array
  5691. typedef struct _DPA *HDPA;
  5692. WINCOMMCTRLAPI HDPA WINAPI DPA_Create(int cItemGrow);
  5693. WINCOMMCTRLAPI BOOL WINAPI DPA_Destroy(HDPA hdpa);
  5694. WINCOMMCTRLAPI PVOID WINAPI DPA_DeletePtr(HDPA hdpa, int i);
  5695. WINCOMMCTRLAPI BOOL WINAPI DPA_DeleteAllPtrs(HDPA hdpa);
  5696. WINCOMMCTRLAPI void WINAPI DPA_EnumCallback(HDPA hdpa, PFNDPAENUMCALLBACK pfnCB, void *pData);
  5697. WINCOMMCTRLAPI void WINAPI DPA_DestroyCallback(HDPA hdpa, PFNDPAENUMCALLBACK pfnCB, void *pData);
  5698. WINCOMMCTRLAPI BOOL WINAPI DPA_SetPtr(HDPA hdpa, int i, void *p);
  5699. WINCOMMCTRLAPI int WINAPI DPA_InsertPtr(HDPA hdpa, int i, void *p);
  5700. WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(HDPA hdpa, INT_PTR i);
  5701. typedef int (CALLBACK *PFNDPACOMPARE)(void *p1, void *p2, LPARAM lParam);
  5702. WINCOMMCTRLAPI BOOL WINAPI DPA_Sort(HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam);
  5703. // Search array. If DPAS_SORTED, then array is assumed to be sorted
  5704. // according to pfnCompare, and binary search algorithm is used.
  5705. // Otherwise, linear search is used.
  5706. //
  5707. // Searching starts at iStart (0 to start search at beginning).
  5708. //
  5709. // DPAS_INSERTBEFORE/AFTER govern what happens if an exact match is not
  5710. // found. If neither are specified, this function returns -1 if no exact
  5711. // match is found. Otherwise, the index of the item before or after the
  5712. // closest (including exact) match is returned.
  5713. //
  5714. // Search option flags
  5715. //
  5716. #define DPAS_SORTED 0x0001
  5717. #define DPAS_INSERTBEFORE 0x0002
  5718. #define DPAS_INSERTAFTER 0x0004
  5719. WINCOMMCTRLAPI int WINAPI DPA_Search(HDPA hdpa, void *pFind, int iStart, PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT options);
  5720. WINCOMMCTRLAPI BOOL WINAPI Str_SetPtrW(LPWSTR * ppsz, LPCWSTR psz);
  5721. #ifdef _WIN32
  5722. //====== TrackMouseEvent =====================================================
  5723. #ifndef NOTRACKMOUSEEVENT
  5724. //
  5725. // If the messages for TrackMouseEvent have not been defined then define them
  5726. // now.
  5727. //
  5728. #ifndef WM_MOUSEHOVER
  5729. #define WM_MOUSEHOVER 0x02A1
  5730. #define WM_MOUSELEAVE 0x02A3
  5731. #endif
  5732. //
  5733. // If the TRACKMOUSEEVENT structure and associated flags havent been declared
  5734. // then declare them now.
  5735. //
  5736. #ifndef TME_HOVER
  5737. #define TME_HOVER 0x00000001
  5738. #define TME_LEAVE 0x00000002
  5739. #if (WINVER >= 0x0500)
  5740. #define TME_NONCLIENT 0x00000010
  5741. #endif /* WINVER >= 0x0500 */
  5742. #define TME_QUERY 0x40000000
  5743. #define TME_CANCEL 0x80000000
  5744. #define HOVER_DEFAULT 0xFFFFFFFF
  5745. typedef struct tagTRACKMOUSEEVENT {
  5746. DWORD cbSize;
  5747. DWORD dwFlags;
  5748. HWND hwndTrack;
  5749. DWORD dwHoverTime;
  5750. } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
  5751. #endif // !TME_HOVER
  5752. //
  5753. // Declare _TrackMouseEvent. This API tries to use the window manager's
  5754. // implementation of TrackMouseEvent if it is present, otherwise it emulates.
  5755. //
  5756. WINCOMMCTRLAPI
  5757. BOOL
  5758. WINAPI
  5759. _TrackMouseEvent(
  5760. LPTRACKMOUSEEVENT lpEventTrack);
  5761. #endif // !NOTRACKMOUSEEVENT
  5762. #if (_WIN32_IE >= 0x0400)
  5763. //====== Flat Scrollbar APIs=========================================
  5764. #ifndef NOFLATSBAPIS
  5765. #define WSB_PROP_CYVSCROLL 0x00000001L
  5766. #define WSB_PROP_CXHSCROLL 0x00000002L
  5767. #define WSB_PROP_CYHSCROLL 0x00000004L
  5768. #define WSB_PROP_CXVSCROLL 0x00000008L
  5769. #define WSB_PROP_CXHTHUMB 0x00000010L
  5770. #define WSB_PROP_CYVTHUMB 0x00000020L
  5771. #define WSB_PROP_VBKGCOLOR 0x00000040L
  5772. #define WSB_PROP_HBKGCOLOR 0x00000080L
  5773. #define WSB_PROP_VSTYLE 0x00000100L
  5774. #define WSB_PROP_HSTYLE 0x00000200L
  5775. #define WSB_PROP_WINSTYLE 0x00000400L
  5776. #define WSB_PROP_PALETTE 0x00000800L
  5777. #define WSB_PROP_MASK 0x00000FFFL
  5778. #define FSB_FLAT_MODE 2
  5779. #define FSB_ENCARTA_MODE 1
  5780. #define FSB_REGULAR_MODE 0
  5781. WINCOMMCTRLAPI BOOL WINAPI FlatSB_EnableScrollBar(HWND, int, UINT);
  5782. WINCOMMCTRLAPI BOOL WINAPI FlatSB_ShowScrollBar(HWND, int code, BOOL);
  5783. WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollRange(HWND, int code, LPINT, LPINT);
  5784. WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollInfo(HWND, int code, LPSCROLLINFO);
  5785. WINCOMMCTRLAPI int WINAPI FlatSB_GetScrollPos(HWND, int code);
  5786. WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollProp(HWND, int propIndex, LPINT);
  5787. #ifdef _WIN64
  5788. WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollPropPtr(HWND, int propIndex, PINT_PTR);
  5789. #else
  5790. #define FlatSB_GetScrollPropPtr FlatSB_GetScrollProp
  5791. #endif
  5792. WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollPos(HWND, int code, int pos, BOOL fRedraw);
  5793. WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollInfo(HWND, int code, LPSCROLLINFO, BOOL fRedraw);
  5794. WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollRange(HWND, int code, int min, int max, BOOL fRedraw);
  5795. WINCOMMCTRLAPI BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT index, INT_PTR newValue, BOOL);
  5796. #define FlatSB_SetScrollPropPtr FlatSB_SetScrollProp
  5797. WINCOMMCTRLAPI BOOL WINAPI InitializeFlatSB(HWND);
  5798. WINCOMMCTRLAPI HRESULT WINAPI UninitializeFlatSB(HWND);
  5799. #endif // NOFLATSBAPIS
  5800. #endif // _WIN32_IE >= 0x0400
  5801. #endif /* _WIN32 */
  5802. #endif // _WIN32_IE >= 0x0300
  5803. #if (_WIN32_WINNT >= 0x501)
  5804. //
  5805. // subclassing stuff
  5806. //
  5807. typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam,
  5808. LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
  5809. BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIdSubclass,
  5810. DWORD_PTR dwRefData);
  5811. BOOL WINAPI GetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIdSubclass,
  5812. DWORD_PTR *pdwRefData);
  5813. BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass,
  5814. UINT_PTR uIdSubclass);
  5815. LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  5816. #endif
  5817. #if (_WIN32_WINNT >= 0x501)
  5818. int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT* prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow,
  5819. int ixOffset, int iyOffset);
  5820. #endif
  5821. #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
  5822. #if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
  5823. #if !defined(ISOLATION_AWARE_USE_STATIC_LIBRARY)
  5824. #define ISOLATION_AWARE_USE_STATIC_LIBRARY 0
  5825. #endif
  5826. #if !defined(ISOLATION_AWARE_BUILD_STATIC_LIBRARY)
  5827. #define ISOLATION_AWARE_BUILD_STATIC_LIBRARY 0
  5828. #endif
  5829. #if !defined(ISOLATION_AWARE_INLINE)
  5830. #if ISOLATION_AWARE_BUILD_STATIC_LIBRARY
  5831. #define ISOLATION_AWARE_INLINE /* nothing */
  5832. #else
  5833. #if defined(__cplusplus)
  5834. #define ISOLATION_AWARE_INLINE inline
  5835. #else
  5836. #define ISOLATION_AWARE_INLINE __inline
  5837. #endif
  5838. #endif
  5839. #endif
  5840. #if !ISOLATION_AWARE_USE_STATIC_LIBRARY
  5841. FARPROC WINAPI CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY(LPCSTR pszProcName);
  5842. #endif /* ISOLATION_AWARE_USE_STATIC_LIBRARY */
  5843. #if !defined(ISOLATIONAWARECOMMCTRL_LPSTREAM)
  5844. #if !defined(__IStream_INTERFACE_DEFINED__)
  5845. #if defined(interface)
  5846. interface IStream; typedef interface IStream IStream;
  5847. #else
  5848. struct IStream; typedef struct IStream IStream;
  5849. #endif
  5850. #endif
  5851. typedef IStream *ISOLATIONAWARECOMMCTRL_LPSTREAM;
  5852. #define ISOLATIONAWARECOMMCTRL_LPSTREAM ISOLATIONAWARECOMMCTRL_LPSTREAM
  5853. #endif
  5854. void WINAPI IsolationAwareInitCommonControls(void);
  5855. BOOL WINAPI IsolationAwareInitCommonControlsEx(LPINITCOMMONCONTROLSEX unnamed1);
  5856. HIMAGELIST WINAPI IsolationAwareImageList_Create(int cx,int cy,UINT flags,int cInitial,int cGrow);
  5857. BOOL WINAPI IsolationAwareImageList_Destroy(HIMAGELIST himl);
  5858. int WINAPI IsolationAwareImageList_GetImageCount(HIMAGELIST himl);
  5859. BOOL WINAPI IsolationAwareImageList_SetImageCount(HIMAGELIST himl,UINT uNewCount);
  5860. int WINAPI IsolationAwareImageList_Add(HIMAGELIST himl,HBITMAP hbmImage,HBITMAP hbmMask);
  5861. int WINAPI IsolationAwareImageList_ReplaceIcon(HIMAGELIST himl,int i,HICON hicon);
  5862. COLORREF WINAPI IsolationAwareImageList_SetBkColor(HIMAGELIST himl,COLORREF clrBk);
  5863. COLORREF WINAPI IsolationAwareImageList_GetBkColor(HIMAGELIST himl);
  5864. BOOL WINAPI IsolationAwareImageList_SetOverlayImage(HIMAGELIST himl,int iImage,int iOverlay);
  5865. BOOL WINAPI IsolationAwareImageList_Draw(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,UINT fStyle);
  5866. BOOL WINAPI IsolationAwareImageList_Replace(HIMAGELIST himl,int i,HBITMAP hbmImage,HBITMAP hbmMask);
  5867. int WINAPI IsolationAwareImageList_AddMasked(HIMAGELIST himl,HBITMAP hbmImage,COLORREF crMask);
  5868. BOOL WINAPI IsolationAwareImageList_DrawEx(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle);
  5869. BOOL WINAPI IsolationAwareImageList_DrawIndirect(IMAGELISTDRAWPARAMS*pimldp);
  5870. BOOL WINAPI IsolationAwareImageList_Remove(HIMAGELIST himl,int i);
  5871. HICON WINAPI IsolationAwareImageList_GetIcon(HIMAGELIST himl,int i,UINT flags);
  5872. HIMAGELIST WINAPI IsolationAwareImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
  5873. HIMAGELIST WINAPI IsolationAwareImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
  5874. BOOL WINAPI IsolationAwareImageList_Copy(HIMAGELIST himlDst,int iDst,HIMAGELIST himlSrc,int iSrc,UINT uFlags);
  5875. BOOL WINAPI IsolationAwareImageList_BeginDrag(HIMAGELIST himlTrack,int iTrack,int dxHotspot,int dyHotspot);
  5876. void WINAPI IsolationAwareImageList_EndDrag(void);
  5877. BOOL WINAPI IsolationAwareImageList_DragEnter(HWND hwndLock,int x,int y);
  5878. BOOL WINAPI IsolationAwareImageList_DragLeave(HWND hwndLock);
  5879. BOOL WINAPI IsolationAwareImageList_DragMove(int x,int y);
  5880. BOOL WINAPI IsolationAwareImageList_SetDragCursorImage(HIMAGELIST himlDrag,int iDrag,int dxHotspot,int dyHotspot);
  5881. BOOL WINAPI IsolationAwareImageList_DragShowNolock(BOOL fShow);
  5882. HIMAGELIST WINAPI IsolationAwareImageList_GetDragImage(POINT*ppt,POINT*pptHotspot);
  5883. HIMAGELIST WINAPI IsolationAwareImageList_Read(ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  5884. BOOL WINAPI IsolationAwareImageList_Write(HIMAGELIST himl,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  5885. #if (_WIN32_WINNT >= 0x0501)
  5886. HRESULT WINAPI IsolationAwareImageList_ReadEx(DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm,REFIID riid,PVOID*ppv);
  5887. HRESULT WINAPI IsolationAwareImageList_WriteEx(HIMAGELIST himl,DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  5888. #endif /* (_WIN32_WINNT >= 0x0501) */
  5889. BOOL WINAPI IsolationAwareImageList_GetIconSize(HIMAGELIST himl,int*cx,int*cy);
  5890. BOOL WINAPI IsolationAwareImageList_SetIconSize(HIMAGELIST himl,int cx,int cy);
  5891. BOOL WINAPI IsolationAwareImageList_GetImageInfo(HIMAGELIST himl,int i,IMAGEINFO*pImageInfo);
  5892. HIMAGELIST WINAPI IsolationAwareImageList_Merge(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy);
  5893. HIMAGELIST WINAPI IsolationAwareImageList_Duplicate(HIMAGELIST himl);
  5894. HWND WINAPI IsolationAwareCreateToolbarEx(HWND hwnd,DWORD ws,UINT wID,int nBitmaps,HINSTANCE hBMInst,UINT_PTR wBMID,LPCTBBUTTON lpButtons,int iNumButtons,int dxButton,int dyButton,int dxBitmap,int dyBitmap,UINT uStructSize);
  5895. HBITMAP WINAPI IsolationAwareCreateMappedBitmap(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps);
  5896. void WINAPI IsolationAwareDrawStatusTextA(HDC hDC,LPRECT lprc,LPCSTR pszText,UINT uFlags);
  5897. void WINAPI IsolationAwareDrawStatusTextW(HDC hDC,LPRECT lprc,LPCWSTR pszText,UINT uFlags);
  5898. HWND WINAPI IsolationAwareCreateStatusWindowA(long style,LPCSTR lpszText,HWND hwndParent,UINT wID);
  5899. HWND WINAPI IsolationAwareCreateStatusWindowW(long style,LPCWSTR lpszText,HWND hwndParent,UINT wID);
  5900. void WINAPI IsolationAwareMenuHelp(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT*lpwIDs);
  5901. BOOL WINAPI IsolationAwareShowHideMenuCtl(HWND hWnd,UINT_PTR uFlags,LPINT lpInfo);
  5902. void WINAPI IsolationAwareGetEffectiveClientRect(HWND hWnd,LPRECT lprc,LPINT lpInfo);
  5903. BOOL WINAPI IsolationAwareMakeDragList(HWND hLB);
  5904. void WINAPI IsolationAwareDrawInsert(HWND handParent,HWND hLB,int nItem);
  5905. int WINAPI IsolationAwareLBItemFromPt(HWND hLB,POINT pt,BOOL bAutoScroll);
  5906. HWND WINAPI IsolationAwareCreateUpDownControl(DWORD dwStyle,int x,int y,int cx,int cy,HWND hParent,int nID,HINSTANCE hInst,HWND hBuddy,int nUpper,int nLower,int nPos);
  5907. void WINAPI IsolationAwareInitMUILanguage(LANGID uiLang);
  5908. LANGID WINAPI IsolationAwareGetMUILanguage(void);
  5909. HDSA WINAPI IsolationAwareDSA_Create(int cbItem,int cItemGrow);
  5910. BOOL WINAPI IsolationAwareDSA_Destroy(HDSA hdsa);
  5911. void WINAPI IsolationAwareDSA_DestroyCallback(HDSA hdsa,PFNDSAENUMCALLBACK pfnCB,void*pData);
  5912. PVOID WINAPI IsolationAwareDSA_GetItemPtr(HDSA hdsa,int i);
  5913. int WINAPI IsolationAwareDSA_InsertItem(HDSA hdsa,int i,void*pitem);
  5914. HDPA WINAPI IsolationAwareDPA_Create(int cItemGrow);
  5915. BOOL WINAPI IsolationAwareDPA_Destroy(HDPA hdpa);
  5916. PVOID WINAPI IsolationAwareDPA_DeletePtr(HDPA hdpa,int i);
  5917. BOOL WINAPI IsolationAwareDPA_DeleteAllPtrs(HDPA hdpa);
  5918. void WINAPI IsolationAwareDPA_EnumCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData);
  5919. void WINAPI IsolationAwareDPA_DestroyCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData);
  5920. BOOL WINAPI IsolationAwareDPA_SetPtr(HDPA hdpa,int i,void*p);
  5921. int WINAPI IsolationAwareDPA_InsertPtr(HDPA hdpa,int i,void*p);
  5922. PVOID WINAPI IsolationAwareDPA_GetPtr(HDPA hdpa,INT_PTR i);
  5923. BOOL WINAPI IsolationAwareDPA_Sort(HDPA hdpa,PFNDPACOMPARE pfnCompare,LPARAM lParam);
  5924. int WINAPI IsolationAwareDPA_Search(HDPA hdpa,void*pFind,int iStart,PFNDPACOMPARE pfnCompare,LPARAM lParam,UINT options);
  5925. BOOL WINAPI IsolationAwareStr_SetPtrW(LPWSTR*ppsz,LPCWSTR psz);
  5926. #if !defined(NOTRACKMOUSEEVENT)
  5927. BOOL WINAPI IsolationAware_TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
  5928. #endif /* !defined(NOTRACKMOUSEEVENT) */
  5929. BOOL WINAPI IsolationAwareFlatSB_EnableScrollBar(HWND unnamed1,int unnamed2,UINT unnamed3);
  5930. BOOL WINAPI IsolationAwareFlatSB_ShowScrollBar(HWND unnamed1,int code,BOOL unnamed2);
  5931. BOOL WINAPI IsolationAwareFlatSB_GetScrollRange(HWND unnamed1,int code,LPINT unnamed2,LPINT unnamed3);
  5932. BOOL WINAPI IsolationAwareFlatSB_GetScrollInfo(HWND unnamed1,int code,LPSCROLLINFO unnamed2);
  5933. int WINAPI IsolationAwareFlatSB_GetScrollPos(HWND unnamed1,int code);
  5934. BOOL WINAPI IsolationAwareFlatSB_GetScrollProp(HWND unnamed1,int propIndex,LPINT unnamed2);
  5935. BOOL WINAPI IsolationAwareFlatSB_GetScrollPropPtr(HWND unnamed1,int propIndex,PINT_PTR unnamed2);
  5936. int WINAPI IsolationAwareFlatSB_SetScrollPos(HWND unnamed1,int code,int pos,BOOL fRedraw);
  5937. int WINAPI IsolationAwareFlatSB_SetScrollInfo(HWND unnamed1,int code,LPSCROLLINFO unnamed2,BOOL fRedraw);
  5938. int WINAPI IsolationAwareFlatSB_SetScrollRange(HWND unnamed1,int code,int min,int max,BOOL fRedraw);
  5939. BOOL WINAPI IsolationAwareFlatSB_SetScrollProp(HWND unnamed1,UINT index,INT_PTR newValue,BOOL unnamed2);
  5940. BOOL WINAPI IsolationAwareInitializeFlatSB(HWND unnamed1);
  5941. HRESULT WINAPI IsolationAwareUninitializeFlatSB(HWND unnamed1);
  5942. #if (_WIN32_IE >= 0x560)
  5943. BOOL WINAPI IsolationAwareSetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR dwRefData);
  5944. BOOL WINAPI IsolationAwareGetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR*pdwRefData);
  5945. BOOL WINAPI IsolationAwareRemoveWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass);
  5946. #endif /* (_WIN32_IE >= 0x560) */
  5947. LRESULT WINAPI IsolationAwareDefSubclassProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
  5948. int WINAPI IsolationAwareDrawShadowText(HDC hdc,LPCWSTR pszText,UINT cch,RECT*prc,DWORD dwFlags,COLORREF crText,COLORREF crShadow,int ixOffset,int iyOffset);
  5949. ISOLATION_AWARE_INLINE HRESULT CommctrlIsolationAwarePrivateJVaQPGbueRfhYg(void)
  5950. {
  5951. DWORD dwLastError = GetLastError();
  5952. if (dwLastError == NO_ERROR)
  5953. dwLastError = ERROR_INTERNAL_ERROR;
  5954. return HRESULT_FROM_WIN32(dwLastError);
  5955. }
  5956. #if defined(UNICODE)
  5957. #define IsolationAwareCreateStatusWindow IsolationAwareCreateStatusWindowW
  5958. #define IsolationAwareDrawStatusText IsolationAwareDrawStatusTextW
  5959. #define IsolationAwareImageList_LoadImage IsolationAwareImageList_LoadImageW
  5960. #else /* UNICODE */
  5961. #define IsolationAwareCreateStatusWindow IsolationAwareCreateStatusWindowA
  5962. #define IsolationAwareDrawStatusText IsolationAwareDrawStatusTextA
  5963. #define IsolationAwareImageList_LoadImage IsolationAwareImageList_LoadImageA
  5964. #endif /* UNICODE */
  5965. #if !ISOLATION_AWARE_USE_STATIC_LIBRARY
  5966. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareInitCommonControls(void)
  5967. {
  5968. typedef void (WINAPI* PFN)(void);
  5969. static PFN s_pfn;
  5970. ULONG_PTR ulpCookie = 0;
  5971. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  5972. if (!fActivateActCtxSuccess)
  5973. return;
  5974. __try
  5975. {
  5976. if (s_pfn == NULL)
  5977. {
  5978. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("InitCommonControls");
  5979. if (s_pfn == NULL)
  5980. __leave;
  5981. }
  5982. s_pfn();
  5983. }
  5984. __finally
  5985. {
  5986. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  5987. {
  5988. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  5989. }
  5990. }
  5991. return;
  5992. }
  5993. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareInitCommonControlsEx(LPINITCOMMONCONTROLSEX unnamed1)
  5994. {
  5995. BOOL fResult = FALSE;
  5996. typedef BOOL (WINAPI* PFN)(LPINITCOMMONCONTROLSEX unnamed1);
  5997. static PFN s_pfn;
  5998. ULONG_PTR ulpCookie = 0;
  5999. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6000. if (!fActivateActCtxSuccess)
  6001. return fResult;
  6002. __try
  6003. {
  6004. if (s_pfn == NULL)
  6005. {
  6006. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("InitCommonControlsEx");
  6007. if (s_pfn == NULL)
  6008. __leave;
  6009. }
  6010. fResult = s_pfn(unnamed1);
  6011. }
  6012. __finally
  6013. {
  6014. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6015. {
  6016. const BOOL fPreserveLastError = (fResult == FALSE);
  6017. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6018. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6019. if (fPreserveLastError)
  6020. SetLastError(dwLastError);
  6021. }
  6022. }
  6023. return fResult;
  6024. }
  6025. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_Create(int cx,int cy,UINT flags,int cInitial,int cGrow)
  6026. {
  6027. HIMAGELIST imagelistResult = NULL;
  6028. typedef HIMAGELIST (WINAPI* PFN)(int cx,int cy,UINT flags,int cInitial,int cGrow);
  6029. static PFN s_pfn;
  6030. ULONG_PTR ulpCookie = 0;
  6031. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6032. if (!fActivateActCtxSuccess)
  6033. return imagelistResult;
  6034. __try
  6035. {
  6036. if (s_pfn == NULL)
  6037. {
  6038. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Create");
  6039. if (s_pfn == NULL)
  6040. __leave;
  6041. }
  6042. imagelistResult = s_pfn(cx,cy,flags,cInitial,cGrow);
  6043. }
  6044. __finally
  6045. {
  6046. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6047. {
  6048. const BOOL fPreserveLastError = (imagelistResult == NULL);
  6049. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6050. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6051. if (fPreserveLastError)
  6052. SetLastError(dwLastError);
  6053. }
  6054. }
  6055. return imagelistResult;
  6056. }
  6057. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Destroy(HIMAGELIST himl)
  6058. {
  6059. BOOL fResult = FALSE;
  6060. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl);
  6061. static PFN s_pfn;
  6062. ULONG_PTR ulpCookie = 0;
  6063. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6064. if (!fActivateActCtxSuccess)
  6065. return fResult;
  6066. __try
  6067. {
  6068. if (s_pfn == NULL)
  6069. {
  6070. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Destroy");
  6071. if (s_pfn == NULL)
  6072. __leave;
  6073. }
  6074. fResult = s_pfn(himl);
  6075. }
  6076. __finally
  6077. {
  6078. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6079. {
  6080. const BOOL fPreserveLastError = (fResult == FALSE);
  6081. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6082. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6083. if (fPreserveLastError)
  6084. SetLastError(dwLastError);
  6085. }
  6086. }
  6087. return fResult;
  6088. }
  6089. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareImageList_GetImageCount(HIMAGELIST himl)
  6090. {
  6091. int nResult = 0 ;
  6092. typedef int (WINAPI* PFN)(HIMAGELIST himl);
  6093. static PFN s_pfn;
  6094. ULONG_PTR ulpCookie = 0;
  6095. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6096. if (!fActivateActCtxSuccess)
  6097. return nResult;
  6098. __try
  6099. {
  6100. if (s_pfn == NULL)
  6101. {
  6102. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetImageCount");
  6103. if (s_pfn == NULL)
  6104. __leave;
  6105. }
  6106. nResult = s_pfn(himl);
  6107. }
  6108. __finally
  6109. {
  6110. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6111. {
  6112. const BOOL fPreserveLastError = (nResult == 0 );
  6113. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6114. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6115. if (fPreserveLastError)
  6116. SetLastError(dwLastError);
  6117. }
  6118. }
  6119. return nResult;
  6120. }
  6121. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_SetImageCount(HIMAGELIST himl,UINT uNewCount)
  6122. {
  6123. BOOL fResult = FALSE;
  6124. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,UINT uNewCount);
  6125. static PFN s_pfn;
  6126. ULONG_PTR ulpCookie = 0;
  6127. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6128. if (!fActivateActCtxSuccess)
  6129. return fResult;
  6130. __try
  6131. {
  6132. if (s_pfn == NULL)
  6133. {
  6134. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_SetImageCount");
  6135. if (s_pfn == NULL)
  6136. __leave;
  6137. }
  6138. fResult = s_pfn(himl,uNewCount);
  6139. }
  6140. __finally
  6141. {
  6142. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6143. {
  6144. const BOOL fPreserveLastError = (fResult == FALSE);
  6145. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6146. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6147. if (fPreserveLastError)
  6148. SetLastError(dwLastError);
  6149. }
  6150. }
  6151. return fResult;
  6152. }
  6153. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareImageList_Add(HIMAGELIST himl,HBITMAP hbmImage,HBITMAP hbmMask)
  6154. {
  6155. int nResult = -1;
  6156. typedef int (WINAPI* PFN)(HIMAGELIST himl,HBITMAP hbmImage,HBITMAP hbmMask);
  6157. static PFN s_pfn;
  6158. ULONG_PTR ulpCookie = 0;
  6159. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6160. if (!fActivateActCtxSuccess)
  6161. return nResult;
  6162. __try
  6163. {
  6164. if (s_pfn == NULL)
  6165. {
  6166. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Add");
  6167. if (s_pfn == NULL)
  6168. __leave;
  6169. }
  6170. nResult = s_pfn(himl,hbmImage,hbmMask);
  6171. }
  6172. __finally
  6173. {
  6174. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6175. {
  6176. const BOOL fPreserveLastError = (nResult == -1);
  6177. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6178. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6179. if (fPreserveLastError)
  6180. SetLastError(dwLastError);
  6181. }
  6182. }
  6183. return nResult;
  6184. }
  6185. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareImageList_ReplaceIcon(HIMAGELIST himl,int i,HICON hicon)
  6186. {
  6187. int nResult = -1;
  6188. typedef int (WINAPI* PFN)(HIMAGELIST himl,int i,HICON hicon);
  6189. static PFN s_pfn;
  6190. ULONG_PTR ulpCookie = 0;
  6191. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6192. if (!fActivateActCtxSuccess)
  6193. return nResult;
  6194. __try
  6195. {
  6196. if (s_pfn == NULL)
  6197. {
  6198. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_ReplaceIcon");
  6199. if (s_pfn == NULL)
  6200. __leave;
  6201. }
  6202. nResult = s_pfn(himl,i,hicon);
  6203. }
  6204. __finally
  6205. {
  6206. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6207. {
  6208. const BOOL fPreserveLastError = (nResult == -1);
  6209. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6210. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6211. if (fPreserveLastError)
  6212. SetLastError(dwLastError);
  6213. }
  6214. }
  6215. return nResult;
  6216. }
  6217. ISOLATION_AWARE_INLINE COLORREF WINAPI IsolationAwareImageList_SetBkColor(HIMAGELIST himl,COLORREF clrBk)
  6218. {
  6219. COLORREF colorResult = RGB(0,0,0);
  6220. typedef COLORREF (WINAPI* PFN)(HIMAGELIST himl,COLORREF clrBk);
  6221. static PFN s_pfn;
  6222. ULONG_PTR ulpCookie = 0;
  6223. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6224. if (!fActivateActCtxSuccess)
  6225. return colorResult;
  6226. __try
  6227. {
  6228. if (s_pfn == NULL)
  6229. {
  6230. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_SetBkColor");
  6231. if (s_pfn == NULL)
  6232. __leave;
  6233. }
  6234. colorResult = s_pfn(himl,clrBk);
  6235. }
  6236. __finally
  6237. {
  6238. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6239. {
  6240. const BOOL fPreserveLastError = (colorResult == RGB(0,0,0));
  6241. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6242. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6243. if (fPreserveLastError)
  6244. SetLastError(dwLastError);
  6245. }
  6246. }
  6247. return colorResult;
  6248. }
  6249. ISOLATION_AWARE_INLINE COLORREF WINAPI IsolationAwareImageList_GetBkColor(HIMAGELIST himl)
  6250. {
  6251. COLORREF colorResult = RGB(0,0,0);
  6252. typedef COLORREF (WINAPI* PFN)(HIMAGELIST himl);
  6253. static PFN s_pfn;
  6254. ULONG_PTR ulpCookie = 0;
  6255. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6256. if (!fActivateActCtxSuccess)
  6257. return colorResult;
  6258. __try
  6259. {
  6260. if (s_pfn == NULL)
  6261. {
  6262. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetBkColor");
  6263. if (s_pfn == NULL)
  6264. __leave;
  6265. }
  6266. colorResult = s_pfn(himl);
  6267. }
  6268. __finally
  6269. {
  6270. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6271. {
  6272. const BOOL fPreserveLastError = (colorResult == RGB(0,0,0));
  6273. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6274. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6275. if (fPreserveLastError)
  6276. SetLastError(dwLastError);
  6277. }
  6278. }
  6279. return colorResult;
  6280. }
  6281. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_SetOverlayImage(HIMAGELIST himl,int iImage,int iOverlay)
  6282. {
  6283. BOOL fResult = FALSE;
  6284. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int iImage,int iOverlay);
  6285. static PFN s_pfn;
  6286. ULONG_PTR ulpCookie = 0;
  6287. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6288. if (!fActivateActCtxSuccess)
  6289. return fResult;
  6290. __try
  6291. {
  6292. if (s_pfn == NULL)
  6293. {
  6294. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_SetOverlayImage");
  6295. if (s_pfn == NULL)
  6296. __leave;
  6297. }
  6298. fResult = s_pfn(himl,iImage,iOverlay);
  6299. }
  6300. __finally
  6301. {
  6302. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6303. {
  6304. const BOOL fPreserveLastError = (fResult == FALSE);
  6305. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6306. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6307. if (fPreserveLastError)
  6308. SetLastError(dwLastError);
  6309. }
  6310. }
  6311. return fResult;
  6312. }
  6313. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Draw(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,UINT fStyle)
  6314. {
  6315. BOOL fResult = FALSE;
  6316. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,UINT fStyle);
  6317. static PFN s_pfn;
  6318. ULONG_PTR ulpCookie = 0;
  6319. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6320. if (!fActivateActCtxSuccess)
  6321. return fResult;
  6322. __try
  6323. {
  6324. if (s_pfn == NULL)
  6325. {
  6326. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Draw");
  6327. if (s_pfn == NULL)
  6328. __leave;
  6329. }
  6330. fResult = s_pfn(himl,i,hdcDst,x,y,fStyle);
  6331. }
  6332. __finally
  6333. {
  6334. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6335. {
  6336. const BOOL fPreserveLastError = (fResult == FALSE);
  6337. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6338. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6339. if (fPreserveLastError)
  6340. SetLastError(dwLastError);
  6341. }
  6342. }
  6343. return fResult;
  6344. }
  6345. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Replace(HIMAGELIST himl,int i,HBITMAP hbmImage,HBITMAP hbmMask)
  6346. {
  6347. BOOL fResult = FALSE;
  6348. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int i,HBITMAP hbmImage,HBITMAP hbmMask);
  6349. static PFN s_pfn;
  6350. ULONG_PTR ulpCookie = 0;
  6351. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6352. if (!fActivateActCtxSuccess)
  6353. return fResult;
  6354. __try
  6355. {
  6356. if (s_pfn == NULL)
  6357. {
  6358. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Replace");
  6359. if (s_pfn == NULL)
  6360. __leave;
  6361. }
  6362. fResult = s_pfn(himl,i,hbmImage,hbmMask);
  6363. }
  6364. __finally
  6365. {
  6366. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6367. {
  6368. const BOOL fPreserveLastError = (fResult == FALSE);
  6369. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6370. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6371. if (fPreserveLastError)
  6372. SetLastError(dwLastError);
  6373. }
  6374. }
  6375. return fResult;
  6376. }
  6377. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareImageList_AddMasked(HIMAGELIST himl,HBITMAP hbmImage,COLORREF crMask)
  6378. {
  6379. int nResult = -1;
  6380. typedef int (WINAPI* PFN)(HIMAGELIST himl,HBITMAP hbmImage,COLORREF crMask);
  6381. static PFN s_pfn;
  6382. ULONG_PTR ulpCookie = 0;
  6383. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6384. if (!fActivateActCtxSuccess)
  6385. return nResult;
  6386. __try
  6387. {
  6388. if (s_pfn == NULL)
  6389. {
  6390. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_AddMasked");
  6391. if (s_pfn == NULL)
  6392. __leave;
  6393. }
  6394. nResult = s_pfn(himl,hbmImage,crMask);
  6395. }
  6396. __finally
  6397. {
  6398. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6399. {
  6400. const BOOL fPreserveLastError = (nResult == -1);
  6401. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6402. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6403. if (fPreserveLastError)
  6404. SetLastError(dwLastError);
  6405. }
  6406. }
  6407. return nResult;
  6408. }
  6409. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DrawEx(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle)
  6410. {
  6411. BOOL fResult = FALSE;
  6412. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle);
  6413. static PFN s_pfn;
  6414. ULONG_PTR ulpCookie = 0;
  6415. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6416. if (!fActivateActCtxSuccess)
  6417. return fResult;
  6418. __try
  6419. {
  6420. if (s_pfn == NULL)
  6421. {
  6422. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DrawEx");
  6423. if (s_pfn == NULL)
  6424. __leave;
  6425. }
  6426. fResult = s_pfn(himl,i,hdcDst,x,y,dx,dy,rgbBk,rgbFg,fStyle);
  6427. }
  6428. __finally
  6429. {
  6430. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6431. {
  6432. const BOOL fPreserveLastError = (fResult == FALSE);
  6433. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6434. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6435. if (fPreserveLastError)
  6436. SetLastError(dwLastError);
  6437. }
  6438. }
  6439. return fResult;
  6440. }
  6441. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DrawIndirect(IMAGELISTDRAWPARAMS*pimldp)
  6442. {
  6443. BOOL fResult = FALSE;
  6444. typedef BOOL (WINAPI* PFN)(IMAGELISTDRAWPARAMS*pimldp);
  6445. static PFN s_pfn;
  6446. ULONG_PTR ulpCookie = 0;
  6447. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6448. if (!fActivateActCtxSuccess)
  6449. return fResult;
  6450. __try
  6451. {
  6452. if (s_pfn == NULL)
  6453. {
  6454. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DrawIndirect");
  6455. if (s_pfn == NULL)
  6456. __leave;
  6457. }
  6458. fResult = s_pfn(pimldp);
  6459. }
  6460. __finally
  6461. {
  6462. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6463. {
  6464. const BOOL fPreserveLastError = (fResult == FALSE);
  6465. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6466. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6467. if (fPreserveLastError)
  6468. SetLastError(dwLastError);
  6469. }
  6470. }
  6471. return fResult;
  6472. }
  6473. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Remove(HIMAGELIST himl,int i)
  6474. {
  6475. BOOL fResult = FALSE;
  6476. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int i);
  6477. static PFN s_pfn;
  6478. ULONG_PTR ulpCookie = 0;
  6479. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6480. if (!fActivateActCtxSuccess)
  6481. return fResult;
  6482. __try
  6483. {
  6484. if (s_pfn == NULL)
  6485. {
  6486. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Remove");
  6487. if (s_pfn == NULL)
  6488. __leave;
  6489. }
  6490. fResult = s_pfn(himl,i);
  6491. }
  6492. __finally
  6493. {
  6494. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6495. {
  6496. const BOOL fPreserveLastError = (fResult == FALSE);
  6497. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6498. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6499. if (fPreserveLastError)
  6500. SetLastError(dwLastError);
  6501. }
  6502. }
  6503. return fResult;
  6504. }
  6505. ISOLATION_AWARE_INLINE HICON WINAPI IsolationAwareImageList_GetIcon(HIMAGELIST himl,int i,UINT flags)
  6506. {
  6507. HICON iconResult = NULL;
  6508. typedef HICON (WINAPI* PFN)(HIMAGELIST himl,int i,UINT flags);
  6509. static PFN s_pfn;
  6510. ULONG_PTR ulpCookie = 0;
  6511. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6512. if (!fActivateActCtxSuccess)
  6513. return iconResult;
  6514. __try
  6515. {
  6516. if (s_pfn == NULL)
  6517. {
  6518. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetIcon");
  6519. if (s_pfn == NULL)
  6520. __leave;
  6521. }
  6522. iconResult = s_pfn(himl,i,flags);
  6523. }
  6524. __finally
  6525. {
  6526. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6527. {
  6528. const BOOL fPreserveLastError = (iconResult == NULL);
  6529. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6530. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6531. if (fPreserveLastError)
  6532. SetLastError(dwLastError);
  6533. }
  6534. }
  6535. return iconResult;
  6536. }
  6537. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags)
  6538. {
  6539. HIMAGELIST imagelistResult = NULL;
  6540. typedef HIMAGELIST (WINAPI* PFN)(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
  6541. static PFN s_pfn;
  6542. ULONG_PTR ulpCookie = 0;
  6543. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6544. if (!fActivateActCtxSuccess)
  6545. return imagelistResult;
  6546. __try
  6547. {
  6548. if (s_pfn == NULL)
  6549. {
  6550. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_LoadImageA");
  6551. if (s_pfn == NULL)
  6552. __leave;
  6553. }
  6554. imagelistResult = s_pfn(hi,lpbmp,cx,cGrow,crMask,uType,uFlags);
  6555. }
  6556. __finally
  6557. {
  6558. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6559. {
  6560. const BOOL fPreserveLastError = (imagelistResult == NULL);
  6561. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6562. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6563. if (fPreserveLastError)
  6564. SetLastError(dwLastError);
  6565. }
  6566. }
  6567. return imagelistResult;
  6568. }
  6569. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags)
  6570. {
  6571. HIMAGELIST imagelistResult = NULL;
  6572. typedef HIMAGELIST (WINAPI* PFN)(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
  6573. static PFN s_pfn;
  6574. ULONG_PTR ulpCookie = 0;
  6575. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6576. if (!fActivateActCtxSuccess)
  6577. return imagelistResult;
  6578. __try
  6579. {
  6580. if (s_pfn == NULL)
  6581. {
  6582. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_LoadImageW");
  6583. if (s_pfn == NULL)
  6584. __leave;
  6585. }
  6586. imagelistResult = s_pfn(hi,lpbmp,cx,cGrow,crMask,uType,uFlags);
  6587. }
  6588. __finally
  6589. {
  6590. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6591. {
  6592. const BOOL fPreserveLastError = (imagelistResult == NULL);
  6593. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6594. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6595. if (fPreserveLastError)
  6596. SetLastError(dwLastError);
  6597. }
  6598. }
  6599. return imagelistResult;
  6600. }
  6601. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Copy(HIMAGELIST himlDst,int iDst,HIMAGELIST himlSrc,int iSrc,UINT uFlags)
  6602. {
  6603. BOOL fResult = FALSE;
  6604. typedef BOOL (WINAPI* PFN)(HIMAGELIST himlDst,int iDst,HIMAGELIST himlSrc,int iSrc,UINT uFlags);
  6605. static PFN s_pfn;
  6606. ULONG_PTR ulpCookie = 0;
  6607. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6608. if (!fActivateActCtxSuccess)
  6609. return fResult;
  6610. __try
  6611. {
  6612. if (s_pfn == NULL)
  6613. {
  6614. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Copy");
  6615. if (s_pfn == NULL)
  6616. __leave;
  6617. }
  6618. fResult = s_pfn(himlDst,iDst,himlSrc,iSrc,uFlags);
  6619. }
  6620. __finally
  6621. {
  6622. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6623. {
  6624. const BOOL fPreserveLastError = (fResult == FALSE);
  6625. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6626. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6627. if (fPreserveLastError)
  6628. SetLastError(dwLastError);
  6629. }
  6630. }
  6631. return fResult;
  6632. }
  6633. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_BeginDrag(HIMAGELIST himlTrack,int iTrack,int dxHotspot,int dyHotspot)
  6634. {
  6635. BOOL fResult = FALSE;
  6636. typedef BOOL (WINAPI* PFN)(HIMAGELIST himlTrack,int iTrack,int dxHotspot,int dyHotspot);
  6637. static PFN s_pfn;
  6638. ULONG_PTR ulpCookie = 0;
  6639. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6640. if (!fActivateActCtxSuccess)
  6641. return fResult;
  6642. __try
  6643. {
  6644. if (s_pfn == NULL)
  6645. {
  6646. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_BeginDrag");
  6647. if (s_pfn == NULL)
  6648. __leave;
  6649. }
  6650. fResult = s_pfn(himlTrack,iTrack,dxHotspot,dyHotspot);
  6651. }
  6652. __finally
  6653. {
  6654. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6655. {
  6656. const BOOL fPreserveLastError = (fResult == FALSE);
  6657. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6658. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6659. if (fPreserveLastError)
  6660. SetLastError(dwLastError);
  6661. }
  6662. }
  6663. return fResult;
  6664. }
  6665. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareImageList_EndDrag(void)
  6666. {
  6667. typedef void (WINAPI* PFN)(void);
  6668. static PFN s_pfn;
  6669. ULONG_PTR ulpCookie = 0;
  6670. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6671. if (!fActivateActCtxSuccess)
  6672. return;
  6673. __try
  6674. {
  6675. if (s_pfn == NULL)
  6676. {
  6677. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_EndDrag");
  6678. if (s_pfn == NULL)
  6679. __leave;
  6680. }
  6681. s_pfn();
  6682. }
  6683. __finally
  6684. {
  6685. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6686. {
  6687. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6688. }
  6689. }
  6690. return;
  6691. }
  6692. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DragEnter(HWND hwndLock,int x,int y)
  6693. {
  6694. BOOL fResult = FALSE;
  6695. typedef BOOL (WINAPI* PFN)(HWND hwndLock,int x,int y);
  6696. static PFN s_pfn;
  6697. ULONG_PTR ulpCookie = 0;
  6698. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6699. if (!fActivateActCtxSuccess)
  6700. return fResult;
  6701. __try
  6702. {
  6703. if (s_pfn == NULL)
  6704. {
  6705. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DragEnter");
  6706. if (s_pfn == NULL)
  6707. __leave;
  6708. }
  6709. fResult = s_pfn(hwndLock,x,y);
  6710. }
  6711. __finally
  6712. {
  6713. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6714. {
  6715. const BOOL fPreserveLastError = (fResult == FALSE);
  6716. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6717. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6718. if (fPreserveLastError)
  6719. SetLastError(dwLastError);
  6720. }
  6721. }
  6722. return fResult;
  6723. }
  6724. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DragLeave(HWND hwndLock)
  6725. {
  6726. BOOL fResult = FALSE;
  6727. typedef BOOL (WINAPI* PFN)(HWND hwndLock);
  6728. static PFN s_pfn;
  6729. ULONG_PTR ulpCookie = 0;
  6730. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6731. if (!fActivateActCtxSuccess)
  6732. return fResult;
  6733. __try
  6734. {
  6735. if (s_pfn == NULL)
  6736. {
  6737. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DragLeave");
  6738. if (s_pfn == NULL)
  6739. __leave;
  6740. }
  6741. fResult = s_pfn(hwndLock);
  6742. }
  6743. __finally
  6744. {
  6745. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6746. {
  6747. const BOOL fPreserveLastError = (fResult == FALSE);
  6748. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6749. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6750. if (fPreserveLastError)
  6751. SetLastError(dwLastError);
  6752. }
  6753. }
  6754. return fResult;
  6755. }
  6756. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DragMove(int x,int y)
  6757. {
  6758. BOOL fResult = FALSE;
  6759. typedef BOOL (WINAPI* PFN)(int x,int y);
  6760. static PFN s_pfn;
  6761. ULONG_PTR ulpCookie = 0;
  6762. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6763. if (!fActivateActCtxSuccess)
  6764. return fResult;
  6765. __try
  6766. {
  6767. if (s_pfn == NULL)
  6768. {
  6769. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DragMove");
  6770. if (s_pfn == NULL)
  6771. __leave;
  6772. }
  6773. fResult = s_pfn(x,y);
  6774. }
  6775. __finally
  6776. {
  6777. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6778. {
  6779. const BOOL fPreserveLastError = (fResult == FALSE);
  6780. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6781. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6782. if (fPreserveLastError)
  6783. SetLastError(dwLastError);
  6784. }
  6785. }
  6786. return fResult;
  6787. }
  6788. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_SetDragCursorImage(HIMAGELIST himlDrag,int iDrag,int dxHotspot,int dyHotspot)
  6789. {
  6790. BOOL fResult = FALSE;
  6791. typedef BOOL (WINAPI* PFN)(HIMAGELIST himlDrag,int iDrag,int dxHotspot,int dyHotspot);
  6792. static PFN s_pfn;
  6793. ULONG_PTR ulpCookie = 0;
  6794. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6795. if (!fActivateActCtxSuccess)
  6796. return fResult;
  6797. __try
  6798. {
  6799. if (s_pfn == NULL)
  6800. {
  6801. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_SetDragCursorImage");
  6802. if (s_pfn == NULL)
  6803. __leave;
  6804. }
  6805. fResult = s_pfn(himlDrag,iDrag,dxHotspot,dyHotspot);
  6806. }
  6807. __finally
  6808. {
  6809. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6810. {
  6811. const BOOL fPreserveLastError = (fResult == FALSE);
  6812. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6813. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6814. if (fPreserveLastError)
  6815. SetLastError(dwLastError);
  6816. }
  6817. }
  6818. return fResult;
  6819. }
  6820. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_DragShowNolock(BOOL fShow)
  6821. {
  6822. BOOL fResult = FALSE;
  6823. typedef BOOL (WINAPI* PFN)(BOOL fShow);
  6824. static PFN s_pfn;
  6825. ULONG_PTR ulpCookie = 0;
  6826. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6827. if (!fActivateActCtxSuccess)
  6828. return fResult;
  6829. __try
  6830. {
  6831. if (s_pfn == NULL)
  6832. {
  6833. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_DragShowNolock");
  6834. if (s_pfn == NULL)
  6835. __leave;
  6836. }
  6837. fResult = s_pfn(fShow);
  6838. }
  6839. __finally
  6840. {
  6841. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6842. {
  6843. const BOOL fPreserveLastError = (fResult == FALSE);
  6844. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6845. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6846. if (fPreserveLastError)
  6847. SetLastError(dwLastError);
  6848. }
  6849. }
  6850. return fResult;
  6851. }
  6852. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_GetDragImage(POINT*ppt,POINT*pptHotspot)
  6853. {
  6854. HIMAGELIST imagelistResult = NULL;
  6855. typedef HIMAGELIST (WINAPI* PFN)(POINT*ppt,POINT*pptHotspot);
  6856. static PFN s_pfn;
  6857. ULONG_PTR ulpCookie = 0;
  6858. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6859. if (!fActivateActCtxSuccess)
  6860. return imagelistResult;
  6861. __try
  6862. {
  6863. if (s_pfn == NULL)
  6864. {
  6865. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetDragImage");
  6866. if (s_pfn == NULL)
  6867. __leave;
  6868. }
  6869. imagelistResult = s_pfn(ppt,pptHotspot);
  6870. }
  6871. __finally
  6872. {
  6873. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6874. {
  6875. const BOOL fPreserveLastError = (imagelistResult == NULL);
  6876. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6877. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6878. if (fPreserveLastError)
  6879. SetLastError(dwLastError);
  6880. }
  6881. }
  6882. return imagelistResult;
  6883. }
  6884. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_Read(ISOLATIONAWARECOMMCTRL_LPSTREAM pstm)
  6885. {
  6886. HIMAGELIST imagelistResult = NULL;
  6887. typedef HIMAGELIST (WINAPI* PFN)(ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  6888. static PFN s_pfn;
  6889. ULONG_PTR ulpCookie = 0;
  6890. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6891. if (!fActivateActCtxSuccess)
  6892. return imagelistResult;
  6893. __try
  6894. {
  6895. if (s_pfn == NULL)
  6896. {
  6897. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Read");
  6898. if (s_pfn == NULL)
  6899. __leave;
  6900. }
  6901. imagelistResult = s_pfn(pstm);
  6902. }
  6903. __finally
  6904. {
  6905. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6906. {
  6907. const BOOL fPreserveLastError = (imagelistResult == NULL);
  6908. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6909. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6910. if (fPreserveLastError)
  6911. SetLastError(dwLastError);
  6912. }
  6913. }
  6914. return imagelistResult;
  6915. }
  6916. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_Write(HIMAGELIST himl,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm)
  6917. {
  6918. BOOL fResult = FALSE;
  6919. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  6920. static PFN s_pfn;
  6921. ULONG_PTR ulpCookie = 0;
  6922. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6923. if (!fActivateActCtxSuccess)
  6924. return fResult;
  6925. __try
  6926. {
  6927. if (s_pfn == NULL)
  6928. {
  6929. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Write");
  6930. if (s_pfn == NULL)
  6931. __leave;
  6932. }
  6933. fResult = s_pfn(himl,pstm);
  6934. }
  6935. __finally
  6936. {
  6937. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6938. {
  6939. const BOOL fPreserveLastError = (fResult == FALSE);
  6940. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  6941. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6942. if (fPreserveLastError)
  6943. SetLastError(dwLastError);
  6944. }
  6945. }
  6946. return fResult;
  6947. }
  6948. #if (_WIN32_WINNT >= 0x0501)
  6949. ISOLATION_AWARE_INLINE HRESULT WINAPI IsolationAwareImageList_ReadEx(DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm,REFIID riid,PVOID*ppv)
  6950. {
  6951. HRESULT result = S_OK;
  6952. typedef HRESULT (WINAPI* PFN)(DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm,REFIID riid,PVOID*ppv);
  6953. static PFN s_pfn;
  6954. ULONG_PTR ulpCookie = 0;
  6955. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6956. if (!fActivateActCtxSuccess)
  6957. return CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  6958. __try
  6959. {
  6960. if (s_pfn == NULL)
  6961. {
  6962. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_ReadEx");
  6963. if (s_pfn == NULL)
  6964. {
  6965. result = CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  6966. __leave;
  6967. }
  6968. }
  6969. result = s_pfn(dwFlags,pstm,riid,ppv);
  6970. }
  6971. __finally
  6972. {
  6973. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  6974. {
  6975. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  6976. }
  6977. }
  6978. return result;
  6979. }
  6980. ISOLATION_AWARE_INLINE HRESULT WINAPI IsolationAwareImageList_WriteEx(HIMAGELIST himl,DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm)
  6981. {
  6982. HRESULT result = S_OK;
  6983. typedef HRESULT (WINAPI* PFN)(HIMAGELIST himl,DWORD dwFlags,ISOLATIONAWARECOMMCTRL_LPSTREAM pstm);
  6984. static PFN s_pfn;
  6985. ULONG_PTR ulpCookie = 0;
  6986. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  6987. if (!fActivateActCtxSuccess)
  6988. return CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  6989. __try
  6990. {
  6991. if (s_pfn == NULL)
  6992. {
  6993. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_WriteEx");
  6994. if (s_pfn == NULL)
  6995. {
  6996. result = CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  6997. __leave;
  6998. }
  6999. }
  7000. result = s_pfn(himl,dwFlags,pstm);
  7001. }
  7002. __finally
  7003. {
  7004. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7005. {
  7006. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7007. }
  7008. }
  7009. return result;
  7010. }
  7011. #endif /* (_WIN32_WINNT >= 0x0501) */
  7012. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_GetIconSize(HIMAGELIST himl,int*cx,int*cy)
  7013. {
  7014. BOOL fResult = FALSE;
  7015. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int*cx,int*cy);
  7016. static PFN s_pfn;
  7017. ULONG_PTR ulpCookie = 0;
  7018. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7019. if (!fActivateActCtxSuccess)
  7020. return fResult;
  7021. __try
  7022. {
  7023. if (s_pfn == NULL)
  7024. {
  7025. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetIconSize");
  7026. if (s_pfn == NULL)
  7027. __leave;
  7028. }
  7029. fResult = s_pfn(himl,cx,cy);
  7030. }
  7031. __finally
  7032. {
  7033. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7034. {
  7035. const BOOL fPreserveLastError = (fResult == FALSE);
  7036. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7037. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7038. if (fPreserveLastError)
  7039. SetLastError(dwLastError);
  7040. }
  7041. }
  7042. return fResult;
  7043. }
  7044. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_SetIconSize(HIMAGELIST himl,int cx,int cy)
  7045. {
  7046. BOOL fResult = FALSE;
  7047. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int cx,int cy);
  7048. static PFN s_pfn;
  7049. ULONG_PTR ulpCookie = 0;
  7050. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7051. if (!fActivateActCtxSuccess)
  7052. return fResult;
  7053. __try
  7054. {
  7055. if (s_pfn == NULL)
  7056. {
  7057. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_SetIconSize");
  7058. if (s_pfn == NULL)
  7059. __leave;
  7060. }
  7061. fResult = s_pfn(himl,cx,cy);
  7062. }
  7063. __finally
  7064. {
  7065. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7066. {
  7067. const BOOL fPreserveLastError = (fResult == FALSE);
  7068. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7069. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7070. if (fPreserveLastError)
  7071. SetLastError(dwLastError);
  7072. }
  7073. }
  7074. return fResult;
  7075. }
  7076. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareImageList_GetImageInfo(HIMAGELIST himl,int i,IMAGEINFO*pImageInfo)
  7077. {
  7078. BOOL fResult = FALSE;
  7079. typedef BOOL (WINAPI* PFN)(HIMAGELIST himl,int i,IMAGEINFO*pImageInfo);
  7080. static PFN s_pfn;
  7081. ULONG_PTR ulpCookie = 0;
  7082. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7083. if (!fActivateActCtxSuccess)
  7084. return fResult;
  7085. __try
  7086. {
  7087. if (s_pfn == NULL)
  7088. {
  7089. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_GetImageInfo");
  7090. if (s_pfn == NULL)
  7091. __leave;
  7092. }
  7093. fResult = s_pfn(himl,i,pImageInfo);
  7094. }
  7095. __finally
  7096. {
  7097. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7098. {
  7099. const BOOL fPreserveLastError = (fResult == FALSE);
  7100. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7101. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7102. if (fPreserveLastError)
  7103. SetLastError(dwLastError);
  7104. }
  7105. }
  7106. return fResult;
  7107. }
  7108. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_Merge(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy)
  7109. {
  7110. HIMAGELIST imagelistResult = NULL;
  7111. typedef HIMAGELIST (WINAPI* PFN)(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy);
  7112. static PFN s_pfn;
  7113. ULONG_PTR ulpCookie = 0;
  7114. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7115. if (!fActivateActCtxSuccess)
  7116. return imagelistResult;
  7117. __try
  7118. {
  7119. if (s_pfn == NULL)
  7120. {
  7121. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Merge");
  7122. if (s_pfn == NULL)
  7123. __leave;
  7124. }
  7125. imagelistResult = s_pfn(himl1,i1,himl2,i2,dx,dy);
  7126. }
  7127. __finally
  7128. {
  7129. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7130. {
  7131. const BOOL fPreserveLastError = (imagelistResult == NULL);
  7132. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7133. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7134. if (fPreserveLastError)
  7135. SetLastError(dwLastError);
  7136. }
  7137. }
  7138. return imagelistResult;
  7139. }
  7140. ISOLATION_AWARE_INLINE HIMAGELIST WINAPI IsolationAwareImageList_Duplicate(HIMAGELIST himl)
  7141. {
  7142. HIMAGELIST imagelistResult = NULL;
  7143. typedef HIMAGELIST (WINAPI* PFN)(HIMAGELIST himl);
  7144. static PFN s_pfn;
  7145. ULONG_PTR ulpCookie = 0;
  7146. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7147. if (!fActivateActCtxSuccess)
  7148. return imagelistResult;
  7149. __try
  7150. {
  7151. if (s_pfn == NULL)
  7152. {
  7153. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ImageList_Duplicate");
  7154. if (s_pfn == NULL)
  7155. __leave;
  7156. }
  7157. imagelistResult = s_pfn(himl);
  7158. }
  7159. __finally
  7160. {
  7161. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7162. {
  7163. const BOOL fPreserveLastError = (imagelistResult == NULL);
  7164. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7165. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7166. if (fPreserveLastError)
  7167. SetLastError(dwLastError);
  7168. }
  7169. }
  7170. return imagelistResult;
  7171. }
  7172. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareCreateToolbarEx(HWND hwnd,DWORD ws,UINT wID,int nBitmaps,HINSTANCE hBMInst,UINT_PTR wBMID,LPCTBBUTTON lpButtons,int iNumButtons,int dxButton,int dyButton,int dxBitmap,int dyBitmap,UINT uStructSize)
  7173. {
  7174. HWND windowResult = NULL;
  7175. typedef HWND (WINAPI* PFN)(HWND hwnd,DWORD ws,UINT wID,int nBitmaps,HINSTANCE hBMInst,UINT_PTR wBMID,LPCTBBUTTON lpButtons,int iNumButtons,int dxButton,int dyButton,int dxBitmap,int dyBitmap,UINT uStructSize);
  7176. static PFN s_pfn;
  7177. ULONG_PTR ulpCookie = 0;
  7178. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7179. if (!fActivateActCtxSuccess)
  7180. return windowResult;
  7181. __try
  7182. {
  7183. if (s_pfn == NULL)
  7184. {
  7185. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("CreateToolbarEx");
  7186. if (s_pfn == NULL)
  7187. __leave;
  7188. }
  7189. windowResult = s_pfn(hwnd,ws,wID,nBitmaps,hBMInst,wBMID,lpButtons,iNumButtons,dxButton,dyButton,dxBitmap,dyBitmap,uStructSize);
  7190. }
  7191. __finally
  7192. {
  7193. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7194. {
  7195. const BOOL fPreserveLastError = (windowResult == NULL);
  7196. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7197. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7198. if (fPreserveLastError)
  7199. SetLastError(dwLastError);
  7200. }
  7201. }
  7202. return windowResult;
  7203. }
  7204. ISOLATION_AWARE_INLINE HBITMAP WINAPI IsolationAwareCreateMappedBitmap(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps)
  7205. {
  7206. HBITMAP bitmapResult = NULL;
  7207. typedef HBITMAP (WINAPI* PFN)(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps);
  7208. static PFN s_pfn;
  7209. ULONG_PTR ulpCookie = 0;
  7210. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7211. if (!fActivateActCtxSuccess)
  7212. return bitmapResult;
  7213. __try
  7214. {
  7215. if (s_pfn == NULL)
  7216. {
  7217. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("CreateMappedBitmap");
  7218. if (s_pfn == NULL)
  7219. __leave;
  7220. }
  7221. bitmapResult = s_pfn(hInstance,idBitmap,wFlags,lpColorMap,iNumMaps);
  7222. }
  7223. __finally
  7224. {
  7225. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7226. {
  7227. const BOOL fPreserveLastError = (bitmapResult == NULL);
  7228. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7229. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7230. if (fPreserveLastError)
  7231. SetLastError(dwLastError);
  7232. }
  7233. }
  7234. return bitmapResult;
  7235. }
  7236. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDrawStatusTextA(HDC hDC,LPRECT lprc,LPCSTR pszText,UINT uFlags)
  7237. {
  7238. typedef void (WINAPI* PFN)(HDC hDC,LPRECT lprc,LPCSTR pszText,UINT uFlags);
  7239. static PFN s_pfn;
  7240. ULONG_PTR ulpCookie = 0;
  7241. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7242. if (!fActivateActCtxSuccess)
  7243. return;
  7244. __try
  7245. {
  7246. if (s_pfn == NULL)
  7247. {
  7248. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DrawStatusTextA");
  7249. if (s_pfn == NULL)
  7250. __leave;
  7251. }
  7252. s_pfn(hDC,lprc,pszText,uFlags);
  7253. }
  7254. __finally
  7255. {
  7256. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7257. {
  7258. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7259. }
  7260. }
  7261. return;
  7262. }
  7263. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDrawStatusTextW(HDC hDC,LPRECT lprc,LPCWSTR pszText,UINT uFlags)
  7264. {
  7265. typedef void (WINAPI* PFN)(HDC hDC,LPRECT lprc,LPCWSTR pszText,UINT uFlags);
  7266. static PFN s_pfn;
  7267. ULONG_PTR ulpCookie = 0;
  7268. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7269. if (!fActivateActCtxSuccess)
  7270. return;
  7271. __try
  7272. {
  7273. if (s_pfn == NULL)
  7274. {
  7275. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DrawStatusTextW");
  7276. if (s_pfn == NULL)
  7277. __leave;
  7278. }
  7279. s_pfn(hDC,lprc,pszText,uFlags);
  7280. }
  7281. __finally
  7282. {
  7283. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7284. {
  7285. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7286. }
  7287. }
  7288. return;
  7289. }
  7290. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareCreateStatusWindowA(long style,LPCSTR lpszText,HWND hwndParent,UINT wID)
  7291. {
  7292. HWND windowResult = NULL;
  7293. typedef HWND (WINAPI* PFN)(long style,LPCSTR lpszText,HWND hwndParent,UINT wID);
  7294. static PFN s_pfn;
  7295. ULONG_PTR ulpCookie = 0;
  7296. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7297. if (!fActivateActCtxSuccess)
  7298. return windowResult;
  7299. __try
  7300. {
  7301. if (s_pfn == NULL)
  7302. {
  7303. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("CreateStatusWindowA");
  7304. if (s_pfn == NULL)
  7305. __leave;
  7306. }
  7307. windowResult = s_pfn(style,lpszText,hwndParent,wID);
  7308. }
  7309. __finally
  7310. {
  7311. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7312. {
  7313. const BOOL fPreserveLastError = (windowResult == NULL);
  7314. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7315. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7316. if (fPreserveLastError)
  7317. SetLastError(dwLastError);
  7318. }
  7319. }
  7320. return windowResult;
  7321. }
  7322. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareCreateStatusWindowW(long style,LPCWSTR lpszText,HWND hwndParent,UINT wID)
  7323. {
  7324. HWND windowResult = NULL;
  7325. typedef HWND (WINAPI* PFN)(long style,LPCWSTR lpszText,HWND hwndParent,UINT wID);
  7326. static PFN s_pfn;
  7327. ULONG_PTR ulpCookie = 0;
  7328. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7329. if (!fActivateActCtxSuccess)
  7330. return windowResult;
  7331. __try
  7332. {
  7333. if (s_pfn == NULL)
  7334. {
  7335. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("CreateStatusWindowW");
  7336. if (s_pfn == NULL)
  7337. __leave;
  7338. }
  7339. windowResult = s_pfn(style,lpszText,hwndParent,wID);
  7340. }
  7341. __finally
  7342. {
  7343. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7344. {
  7345. const BOOL fPreserveLastError = (windowResult == NULL);
  7346. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7347. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7348. if (fPreserveLastError)
  7349. SetLastError(dwLastError);
  7350. }
  7351. }
  7352. return windowResult;
  7353. }
  7354. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareMenuHelp(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT*lpwIDs)
  7355. {
  7356. typedef void (WINAPI* PFN)(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT*lpwIDs);
  7357. static PFN s_pfn;
  7358. ULONG_PTR ulpCookie = 0;
  7359. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7360. if (!fActivateActCtxSuccess)
  7361. return;
  7362. __try
  7363. {
  7364. if (s_pfn == NULL)
  7365. {
  7366. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("MenuHelp");
  7367. if (s_pfn == NULL)
  7368. __leave;
  7369. }
  7370. s_pfn(uMsg,wParam,lParam,hMainMenu,hInst,hwndStatus,lpwIDs);
  7371. }
  7372. __finally
  7373. {
  7374. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7375. {
  7376. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7377. }
  7378. }
  7379. return;
  7380. }
  7381. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareShowHideMenuCtl(HWND hWnd,UINT_PTR uFlags,LPINT lpInfo)
  7382. {
  7383. BOOL fResult = FALSE;
  7384. typedef BOOL (WINAPI* PFN)(HWND hWnd,UINT_PTR uFlags,LPINT lpInfo);
  7385. static PFN s_pfn;
  7386. ULONG_PTR ulpCookie = 0;
  7387. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7388. if (!fActivateActCtxSuccess)
  7389. return fResult;
  7390. __try
  7391. {
  7392. if (s_pfn == NULL)
  7393. {
  7394. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("ShowHideMenuCtl");
  7395. if (s_pfn == NULL)
  7396. __leave;
  7397. }
  7398. fResult = s_pfn(hWnd,uFlags,lpInfo);
  7399. }
  7400. __finally
  7401. {
  7402. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7403. {
  7404. const BOOL fPreserveLastError = (fResult == FALSE);
  7405. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7406. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7407. if (fPreserveLastError)
  7408. SetLastError(dwLastError);
  7409. }
  7410. }
  7411. return fResult;
  7412. }
  7413. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareGetEffectiveClientRect(HWND hWnd,LPRECT lprc,LPINT lpInfo)
  7414. {
  7415. typedef void (WINAPI* PFN)(HWND hWnd,LPRECT lprc,LPINT lpInfo);
  7416. static PFN s_pfn;
  7417. ULONG_PTR ulpCookie = 0;
  7418. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7419. if (!fActivateActCtxSuccess)
  7420. return;
  7421. __try
  7422. {
  7423. if (s_pfn == NULL)
  7424. {
  7425. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("GetEffectiveClientRect");
  7426. if (s_pfn == NULL)
  7427. __leave;
  7428. }
  7429. s_pfn(hWnd,lprc,lpInfo);
  7430. }
  7431. __finally
  7432. {
  7433. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7434. {
  7435. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7436. }
  7437. }
  7438. return;
  7439. }
  7440. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareMakeDragList(HWND hLB)
  7441. {
  7442. BOOL fResult = FALSE;
  7443. typedef BOOL (WINAPI* PFN)(HWND hLB);
  7444. static PFN s_pfn;
  7445. ULONG_PTR ulpCookie = 0;
  7446. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7447. if (!fActivateActCtxSuccess)
  7448. return fResult;
  7449. __try
  7450. {
  7451. if (s_pfn == NULL)
  7452. {
  7453. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("MakeDragList");
  7454. if (s_pfn == NULL)
  7455. __leave;
  7456. }
  7457. fResult = s_pfn(hLB);
  7458. }
  7459. __finally
  7460. {
  7461. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7462. {
  7463. const BOOL fPreserveLastError = (fResult == FALSE);
  7464. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7465. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7466. if (fPreserveLastError)
  7467. SetLastError(dwLastError);
  7468. }
  7469. }
  7470. return fResult;
  7471. }
  7472. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDrawInsert(HWND handParent,HWND hLB,int nItem)
  7473. {
  7474. typedef void (WINAPI* PFN)(HWND handParent,HWND hLB,int nItem);
  7475. static PFN s_pfn;
  7476. ULONG_PTR ulpCookie = 0;
  7477. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7478. if (!fActivateActCtxSuccess)
  7479. return;
  7480. __try
  7481. {
  7482. if (s_pfn == NULL)
  7483. {
  7484. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DrawInsert");
  7485. if (s_pfn == NULL)
  7486. __leave;
  7487. }
  7488. s_pfn(handParent,hLB,nItem);
  7489. }
  7490. __finally
  7491. {
  7492. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7493. {
  7494. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7495. }
  7496. }
  7497. return;
  7498. }
  7499. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareLBItemFromPt(HWND hLB,POINT pt,BOOL bAutoScroll)
  7500. {
  7501. int nResult = -1;
  7502. typedef int (WINAPI* PFN)(HWND hLB,POINT pt,BOOL bAutoScroll);
  7503. static PFN s_pfn;
  7504. ULONG_PTR ulpCookie = 0;
  7505. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7506. if (!fActivateActCtxSuccess)
  7507. return nResult;
  7508. __try
  7509. {
  7510. if (s_pfn == NULL)
  7511. {
  7512. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("LBItemFromPt");
  7513. if (s_pfn == NULL)
  7514. __leave;
  7515. }
  7516. nResult = s_pfn(hLB,pt,bAutoScroll);
  7517. }
  7518. __finally
  7519. {
  7520. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7521. {
  7522. const BOOL fPreserveLastError = (nResult == -1);
  7523. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7524. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7525. if (fPreserveLastError)
  7526. SetLastError(dwLastError);
  7527. }
  7528. }
  7529. return nResult;
  7530. }
  7531. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareCreateUpDownControl(DWORD dwStyle,int x,int y,int cx,int cy,HWND hParent,int nID,HINSTANCE hInst,HWND hBuddy,int nUpper,int nLower,int nPos)
  7532. {
  7533. HWND windowResult = NULL;
  7534. typedef HWND (WINAPI* PFN)(DWORD dwStyle,int x,int y,int cx,int cy,HWND hParent,int nID,HINSTANCE hInst,HWND hBuddy,int nUpper,int nLower,int nPos);
  7535. static PFN s_pfn;
  7536. ULONG_PTR ulpCookie = 0;
  7537. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7538. if (!fActivateActCtxSuccess)
  7539. return windowResult;
  7540. __try
  7541. {
  7542. if (s_pfn == NULL)
  7543. {
  7544. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("CreateUpDownControl");
  7545. if (s_pfn == NULL)
  7546. __leave;
  7547. }
  7548. windowResult = s_pfn(dwStyle,x,y,cx,cy,hParent,nID,hInst,hBuddy,nUpper,nLower,nPos);
  7549. }
  7550. __finally
  7551. {
  7552. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7553. {
  7554. const BOOL fPreserveLastError = (windowResult == NULL);
  7555. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7556. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7557. if (fPreserveLastError)
  7558. SetLastError(dwLastError);
  7559. }
  7560. }
  7561. return windowResult;
  7562. }
  7563. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareInitMUILanguage(LANGID uiLang)
  7564. {
  7565. typedef void (WINAPI* PFN)(LANGID uiLang);
  7566. static PFN s_pfn;
  7567. ULONG_PTR ulpCookie = 0;
  7568. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7569. if (!fActivateActCtxSuccess)
  7570. return;
  7571. __try
  7572. {
  7573. if (s_pfn == NULL)
  7574. {
  7575. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("InitMUILanguage");
  7576. if (s_pfn == NULL)
  7577. __leave;
  7578. }
  7579. s_pfn(uiLang);
  7580. }
  7581. __finally
  7582. {
  7583. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7584. {
  7585. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7586. }
  7587. }
  7588. return;
  7589. }
  7590. ISOLATION_AWARE_INLINE LANGID WINAPI IsolationAwareGetMUILanguage(void)
  7591. {
  7592. LANGID languageIdResult = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL);
  7593. typedef LANGID (WINAPI* PFN)(void);
  7594. static PFN s_pfn;
  7595. ULONG_PTR ulpCookie = 0;
  7596. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7597. if (!fActivateActCtxSuccess)
  7598. return languageIdResult;
  7599. __try
  7600. {
  7601. if (s_pfn == NULL)
  7602. {
  7603. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("GetMUILanguage");
  7604. if (s_pfn == NULL)
  7605. __leave;
  7606. }
  7607. languageIdResult = s_pfn();
  7608. }
  7609. __finally
  7610. {
  7611. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7612. {
  7613. const BOOL fPreserveLastError = (languageIdResult == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
  7614. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7615. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7616. if (fPreserveLastError)
  7617. SetLastError(dwLastError);
  7618. }
  7619. }
  7620. return languageIdResult;
  7621. }
  7622. ISOLATION_AWARE_INLINE HDSA WINAPI IsolationAwareDSA_Create(int cbItem,int cItemGrow)
  7623. {
  7624. HDSA result = NULL;
  7625. typedef HDSA (WINAPI* PFN)(int cbItem,int cItemGrow);
  7626. static PFN s_pfn;
  7627. ULONG_PTR ulpCookie = 0;
  7628. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7629. if (!fActivateActCtxSuccess)
  7630. return result;
  7631. __try
  7632. {
  7633. if (s_pfn == NULL)
  7634. {
  7635. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DSA_Create");
  7636. if (s_pfn == NULL)
  7637. __leave;
  7638. }
  7639. result = s_pfn(cbItem,cItemGrow);
  7640. }
  7641. __finally
  7642. {
  7643. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7644. {
  7645. const BOOL fPreserveLastError = (result == NULL);
  7646. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7647. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7648. if (fPreserveLastError)
  7649. SetLastError(dwLastError);
  7650. }
  7651. }
  7652. return result;
  7653. }
  7654. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDSA_Destroy(HDSA hdsa)
  7655. {
  7656. BOOL fResult = FALSE;
  7657. typedef BOOL (WINAPI* PFN)(HDSA hdsa);
  7658. static PFN s_pfn;
  7659. ULONG_PTR ulpCookie = 0;
  7660. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7661. if (!fActivateActCtxSuccess)
  7662. return fResult;
  7663. __try
  7664. {
  7665. if (s_pfn == NULL)
  7666. {
  7667. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DSA_Destroy");
  7668. if (s_pfn == NULL)
  7669. __leave;
  7670. }
  7671. fResult = s_pfn(hdsa);
  7672. }
  7673. __finally
  7674. {
  7675. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7676. {
  7677. const BOOL fPreserveLastError = (fResult == FALSE);
  7678. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7679. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7680. if (fPreserveLastError)
  7681. SetLastError(dwLastError);
  7682. }
  7683. }
  7684. return fResult;
  7685. }
  7686. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDSA_DestroyCallback(HDSA hdsa,PFNDSAENUMCALLBACK pfnCB,void*pData)
  7687. {
  7688. typedef void (WINAPI* PFN)(HDSA hdsa,PFNDSAENUMCALLBACK pfnCB,void*pData);
  7689. static PFN s_pfn;
  7690. ULONG_PTR ulpCookie = 0;
  7691. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7692. if (!fActivateActCtxSuccess)
  7693. return;
  7694. __try
  7695. {
  7696. if (s_pfn == NULL)
  7697. {
  7698. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DSA_DestroyCallback");
  7699. if (s_pfn == NULL)
  7700. __leave;
  7701. }
  7702. s_pfn(hdsa,pfnCB,pData);
  7703. }
  7704. __finally
  7705. {
  7706. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7707. {
  7708. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7709. }
  7710. }
  7711. return;
  7712. }
  7713. ISOLATION_AWARE_INLINE PVOID WINAPI IsolationAwareDSA_GetItemPtr(HDSA hdsa,int i)
  7714. {
  7715. PVOID vResult = NULL;
  7716. typedef PVOID (WINAPI* PFN)(HDSA hdsa,int i);
  7717. static PFN s_pfn;
  7718. ULONG_PTR ulpCookie = 0;
  7719. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7720. if (!fActivateActCtxSuccess)
  7721. return vResult;
  7722. __try
  7723. {
  7724. if (s_pfn == NULL)
  7725. {
  7726. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DSA_GetItemPtr");
  7727. if (s_pfn == NULL)
  7728. __leave;
  7729. }
  7730. vResult = s_pfn(hdsa,i);
  7731. }
  7732. __finally
  7733. {
  7734. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7735. {
  7736. const BOOL fPreserveLastError = (vResult == NULL);
  7737. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7738. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7739. if (fPreserveLastError)
  7740. SetLastError(dwLastError);
  7741. }
  7742. }
  7743. return vResult;
  7744. }
  7745. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareDSA_InsertItem(HDSA hdsa,int i,void*pitem)
  7746. {
  7747. int nResult = -1;
  7748. typedef int (WINAPI* PFN)(HDSA hdsa,int i,void*pitem);
  7749. static PFN s_pfn;
  7750. ULONG_PTR ulpCookie = 0;
  7751. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7752. if (!fActivateActCtxSuccess)
  7753. return nResult;
  7754. __try
  7755. {
  7756. if (s_pfn == NULL)
  7757. {
  7758. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DSA_InsertItem");
  7759. if (s_pfn == NULL)
  7760. __leave;
  7761. }
  7762. nResult = s_pfn(hdsa,i,pitem);
  7763. }
  7764. __finally
  7765. {
  7766. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7767. {
  7768. const BOOL fPreserveLastError = (nResult == -1);
  7769. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7770. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7771. if (fPreserveLastError)
  7772. SetLastError(dwLastError);
  7773. }
  7774. }
  7775. return nResult;
  7776. }
  7777. ISOLATION_AWARE_INLINE HDPA WINAPI IsolationAwareDPA_Create(int cItemGrow)
  7778. {
  7779. HDPA result = NULL;
  7780. typedef HDPA (WINAPI* PFN)(int cItemGrow);
  7781. static PFN s_pfn;
  7782. ULONG_PTR ulpCookie = 0;
  7783. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7784. if (!fActivateActCtxSuccess)
  7785. return result;
  7786. __try
  7787. {
  7788. if (s_pfn == NULL)
  7789. {
  7790. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_Create");
  7791. if (s_pfn == NULL)
  7792. __leave;
  7793. }
  7794. result = s_pfn(cItemGrow);
  7795. }
  7796. __finally
  7797. {
  7798. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7799. {
  7800. const BOOL fPreserveLastError = (result == NULL);
  7801. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7802. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7803. if (fPreserveLastError)
  7804. SetLastError(dwLastError);
  7805. }
  7806. }
  7807. return result;
  7808. }
  7809. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDPA_Destroy(HDPA hdpa)
  7810. {
  7811. BOOL fResult = FALSE;
  7812. typedef BOOL (WINAPI* PFN)(HDPA hdpa);
  7813. static PFN s_pfn;
  7814. ULONG_PTR ulpCookie = 0;
  7815. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7816. if (!fActivateActCtxSuccess)
  7817. return fResult;
  7818. __try
  7819. {
  7820. if (s_pfn == NULL)
  7821. {
  7822. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_Destroy");
  7823. if (s_pfn == NULL)
  7824. __leave;
  7825. }
  7826. fResult = s_pfn(hdpa);
  7827. }
  7828. __finally
  7829. {
  7830. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7831. {
  7832. const BOOL fPreserveLastError = (fResult == FALSE);
  7833. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7834. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7835. if (fPreserveLastError)
  7836. SetLastError(dwLastError);
  7837. }
  7838. }
  7839. return fResult;
  7840. }
  7841. ISOLATION_AWARE_INLINE PVOID WINAPI IsolationAwareDPA_DeletePtr(HDPA hdpa,int i)
  7842. {
  7843. PVOID vResult = NULL;
  7844. typedef PVOID (WINAPI* PFN)(HDPA hdpa,int i);
  7845. static PFN s_pfn;
  7846. ULONG_PTR ulpCookie = 0;
  7847. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7848. if (!fActivateActCtxSuccess)
  7849. return vResult;
  7850. __try
  7851. {
  7852. if (s_pfn == NULL)
  7853. {
  7854. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_DeletePtr");
  7855. if (s_pfn == NULL)
  7856. __leave;
  7857. }
  7858. vResult = s_pfn(hdpa,i);
  7859. }
  7860. __finally
  7861. {
  7862. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7863. {
  7864. const BOOL fPreserveLastError = (vResult == NULL);
  7865. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7866. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7867. if (fPreserveLastError)
  7868. SetLastError(dwLastError);
  7869. }
  7870. }
  7871. return vResult;
  7872. }
  7873. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDPA_DeleteAllPtrs(HDPA hdpa)
  7874. {
  7875. BOOL fResult = FALSE;
  7876. typedef BOOL (WINAPI* PFN)(HDPA hdpa);
  7877. static PFN s_pfn;
  7878. ULONG_PTR ulpCookie = 0;
  7879. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7880. if (!fActivateActCtxSuccess)
  7881. return fResult;
  7882. __try
  7883. {
  7884. if (s_pfn == NULL)
  7885. {
  7886. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_DeleteAllPtrs");
  7887. if (s_pfn == NULL)
  7888. __leave;
  7889. }
  7890. fResult = s_pfn(hdpa);
  7891. }
  7892. __finally
  7893. {
  7894. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7895. {
  7896. const BOOL fPreserveLastError = (fResult == FALSE);
  7897. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7898. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7899. if (fPreserveLastError)
  7900. SetLastError(dwLastError);
  7901. }
  7902. }
  7903. return fResult;
  7904. }
  7905. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDPA_EnumCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData)
  7906. {
  7907. typedef void (WINAPI* PFN)(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData);
  7908. static PFN s_pfn;
  7909. ULONG_PTR ulpCookie = 0;
  7910. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7911. if (!fActivateActCtxSuccess)
  7912. return;
  7913. __try
  7914. {
  7915. if (s_pfn == NULL)
  7916. {
  7917. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_EnumCallback");
  7918. if (s_pfn == NULL)
  7919. __leave;
  7920. }
  7921. s_pfn(hdpa,pfnCB,pData);
  7922. }
  7923. __finally
  7924. {
  7925. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7926. {
  7927. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7928. }
  7929. }
  7930. return;
  7931. }
  7932. ISOLATION_AWARE_INLINE void WINAPI IsolationAwareDPA_DestroyCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData)
  7933. {
  7934. typedef void (WINAPI* PFN)(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void*pData);
  7935. static PFN s_pfn;
  7936. ULONG_PTR ulpCookie = 0;
  7937. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7938. if (!fActivateActCtxSuccess)
  7939. return;
  7940. __try
  7941. {
  7942. if (s_pfn == NULL)
  7943. {
  7944. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_DestroyCallback");
  7945. if (s_pfn == NULL)
  7946. __leave;
  7947. }
  7948. s_pfn(hdpa,pfnCB,pData);
  7949. }
  7950. __finally
  7951. {
  7952. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7953. {
  7954. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7955. }
  7956. }
  7957. return;
  7958. }
  7959. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDPA_SetPtr(HDPA hdpa,int i,void*p)
  7960. {
  7961. BOOL fResult = FALSE;
  7962. typedef BOOL (WINAPI* PFN)(HDPA hdpa,int i,void*p);
  7963. static PFN s_pfn;
  7964. ULONG_PTR ulpCookie = 0;
  7965. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7966. if (!fActivateActCtxSuccess)
  7967. return fResult;
  7968. __try
  7969. {
  7970. if (s_pfn == NULL)
  7971. {
  7972. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_SetPtr");
  7973. if (s_pfn == NULL)
  7974. __leave;
  7975. }
  7976. fResult = s_pfn(hdpa,i,p);
  7977. }
  7978. __finally
  7979. {
  7980. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  7981. {
  7982. const BOOL fPreserveLastError = (fResult == FALSE);
  7983. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  7984. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  7985. if (fPreserveLastError)
  7986. SetLastError(dwLastError);
  7987. }
  7988. }
  7989. return fResult;
  7990. }
  7991. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareDPA_InsertPtr(HDPA hdpa,int i,void*p)
  7992. {
  7993. int nResult = -1;
  7994. typedef int (WINAPI* PFN)(HDPA hdpa,int i,void*p);
  7995. static PFN s_pfn;
  7996. ULONG_PTR ulpCookie = 0;
  7997. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  7998. if (!fActivateActCtxSuccess)
  7999. return nResult;
  8000. __try
  8001. {
  8002. if (s_pfn == NULL)
  8003. {
  8004. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_InsertPtr");
  8005. if (s_pfn == NULL)
  8006. __leave;
  8007. }
  8008. nResult = s_pfn(hdpa,i,p);
  8009. }
  8010. __finally
  8011. {
  8012. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8013. {
  8014. const BOOL fPreserveLastError = (nResult == -1);
  8015. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8016. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8017. if (fPreserveLastError)
  8018. SetLastError(dwLastError);
  8019. }
  8020. }
  8021. return nResult;
  8022. }
  8023. ISOLATION_AWARE_INLINE PVOID WINAPI IsolationAwareDPA_GetPtr(HDPA hdpa,INT_PTR i)
  8024. {
  8025. PVOID vResult = NULL;
  8026. typedef PVOID (WINAPI* PFN)(HDPA hdpa,INT_PTR i);
  8027. static PFN s_pfn;
  8028. ULONG_PTR ulpCookie = 0;
  8029. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8030. if (!fActivateActCtxSuccess)
  8031. return vResult;
  8032. __try
  8033. {
  8034. if (s_pfn == NULL)
  8035. {
  8036. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_GetPtr");
  8037. if (s_pfn == NULL)
  8038. __leave;
  8039. }
  8040. vResult = s_pfn(hdpa,i);
  8041. }
  8042. __finally
  8043. {
  8044. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8045. {
  8046. const BOOL fPreserveLastError = (vResult == NULL);
  8047. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8048. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8049. if (fPreserveLastError)
  8050. SetLastError(dwLastError);
  8051. }
  8052. }
  8053. return vResult;
  8054. }
  8055. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDPA_Sort(HDPA hdpa,PFNDPACOMPARE pfnCompare,LPARAM lParam)
  8056. {
  8057. BOOL fResult = FALSE;
  8058. typedef BOOL (WINAPI* PFN)(HDPA hdpa,PFNDPACOMPARE pfnCompare,LPARAM lParam);
  8059. static PFN s_pfn;
  8060. ULONG_PTR ulpCookie = 0;
  8061. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8062. if (!fActivateActCtxSuccess)
  8063. return fResult;
  8064. __try
  8065. {
  8066. if (s_pfn == NULL)
  8067. {
  8068. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_Sort");
  8069. if (s_pfn == NULL)
  8070. __leave;
  8071. }
  8072. fResult = s_pfn(hdpa,pfnCompare,lParam);
  8073. }
  8074. __finally
  8075. {
  8076. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8077. {
  8078. const BOOL fPreserveLastError = (fResult == FALSE);
  8079. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8080. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8081. if (fPreserveLastError)
  8082. SetLastError(dwLastError);
  8083. }
  8084. }
  8085. return fResult;
  8086. }
  8087. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareDPA_Search(HDPA hdpa,void*pFind,int iStart,PFNDPACOMPARE pfnCompare,LPARAM lParam,UINT options)
  8088. {
  8089. int nResult = -1;
  8090. typedef int (WINAPI* PFN)(HDPA hdpa,void*pFind,int iStart,PFNDPACOMPARE pfnCompare,LPARAM lParam,UINT options);
  8091. static PFN s_pfn;
  8092. ULONG_PTR ulpCookie = 0;
  8093. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8094. if (!fActivateActCtxSuccess)
  8095. return nResult;
  8096. __try
  8097. {
  8098. if (s_pfn == NULL)
  8099. {
  8100. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DPA_Search");
  8101. if (s_pfn == NULL)
  8102. __leave;
  8103. }
  8104. nResult = s_pfn(hdpa,pFind,iStart,pfnCompare,lParam,options);
  8105. }
  8106. __finally
  8107. {
  8108. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8109. {
  8110. const BOOL fPreserveLastError = (nResult == -1);
  8111. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8112. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8113. if (fPreserveLastError)
  8114. SetLastError(dwLastError);
  8115. }
  8116. }
  8117. return nResult;
  8118. }
  8119. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareStr_SetPtrW(LPWSTR*ppsz,LPCWSTR psz)
  8120. {
  8121. BOOL fResult = FALSE;
  8122. typedef BOOL (WINAPI* PFN)(LPWSTR*ppsz,LPCWSTR psz);
  8123. static PFN s_pfn;
  8124. ULONG_PTR ulpCookie = 0;
  8125. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8126. if (!fActivateActCtxSuccess)
  8127. return fResult;
  8128. __try
  8129. {
  8130. if (s_pfn == NULL)
  8131. {
  8132. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("Str_SetPtrW");
  8133. if (s_pfn == NULL)
  8134. __leave;
  8135. }
  8136. fResult = s_pfn(ppsz,psz);
  8137. }
  8138. __finally
  8139. {
  8140. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8141. {
  8142. const BOOL fPreserveLastError = (fResult == FALSE);
  8143. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8144. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8145. if (fPreserveLastError)
  8146. SetLastError(dwLastError);
  8147. }
  8148. }
  8149. return fResult;
  8150. }
  8151. #if !defined(NOTRACKMOUSEEVENT)
  8152. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAware_TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack)
  8153. {
  8154. BOOL fResult = FALSE;
  8155. typedef BOOL (WINAPI* PFN)(LPTRACKMOUSEEVENT lpEventTrack);
  8156. static PFN s_pfn;
  8157. ULONG_PTR ulpCookie = 0;
  8158. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8159. if (!fActivateActCtxSuccess)
  8160. return fResult;
  8161. __try
  8162. {
  8163. if (s_pfn == NULL)
  8164. {
  8165. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("_TrackMouseEvent");
  8166. if (s_pfn == NULL)
  8167. __leave;
  8168. }
  8169. fResult = s_pfn(lpEventTrack);
  8170. }
  8171. __finally
  8172. {
  8173. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8174. {
  8175. const BOOL fPreserveLastError = (fResult == FALSE);
  8176. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8177. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8178. if (fPreserveLastError)
  8179. SetLastError(dwLastError);
  8180. }
  8181. }
  8182. return fResult;
  8183. }
  8184. #endif /* !defined(NOTRACKMOUSEEVENT) */
  8185. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_EnableScrollBar(HWND unnamed1,int unnamed2,UINT unnamed3)
  8186. {
  8187. BOOL fResult = FALSE;
  8188. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int unnamed2,UINT unnamed3);
  8189. static PFN s_pfn;
  8190. ULONG_PTR ulpCookie = 0;
  8191. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8192. if (!fActivateActCtxSuccess)
  8193. return fResult;
  8194. __try
  8195. {
  8196. if (s_pfn == NULL)
  8197. {
  8198. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_EnableScrollBar");
  8199. if (s_pfn == NULL)
  8200. __leave;
  8201. }
  8202. fResult = s_pfn(unnamed1,unnamed2,unnamed3);
  8203. }
  8204. __finally
  8205. {
  8206. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8207. {
  8208. const BOOL fPreserveLastError = (fResult == FALSE);
  8209. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8210. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8211. if (fPreserveLastError)
  8212. SetLastError(dwLastError);
  8213. }
  8214. }
  8215. return fResult;
  8216. }
  8217. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_ShowScrollBar(HWND unnamed1,int code,BOOL unnamed2)
  8218. {
  8219. BOOL fResult = FALSE;
  8220. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int code,BOOL unnamed2);
  8221. static PFN s_pfn;
  8222. ULONG_PTR ulpCookie = 0;
  8223. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8224. if (!fActivateActCtxSuccess)
  8225. return fResult;
  8226. __try
  8227. {
  8228. if (s_pfn == NULL)
  8229. {
  8230. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_ShowScrollBar");
  8231. if (s_pfn == NULL)
  8232. __leave;
  8233. }
  8234. fResult = s_pfn(unnamed1,code,unnamed2);
  8235. }
  8236. __finally
  8237. {
  8238. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8239. {
  8240. const BOOL fPreserveLastError = (fResult == FALSE);
  8241. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8242. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8243. if (fPreserveLastError)
  8244. SetLastError(dwLastError);
  8245. }
  8246. }
  8247. return fResult;
  8248. }
  8249. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_GetScrollRange(HWND unnamed1,int code,LPINT unnamed2,LPINT unnamed3)
  8250. {
  8251. BOOL fResult = FALSE;
  8252. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int code,LPINT unnamed2,LPINT unnamed3);
  8253. static PFN s_pfn;
  8254. ULONG_PTR ulpCookie = 0;
  8255. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8256. if (!fActivateActCtxSuccess)
  8257. return fResult;
  8258. __try
  8259. {
  8260. if (s_pfn == NULL)
  8261. {
  8262. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_GetScrollRange");
  8263. if (s_pfn == NULL)
  8264. __leave;
  8265. }
  8266. fResult = s_pfn(unnamed1,code,unnamed2,unnamed3);
  8267. }
  8268. __finally
  8269. {
  8270. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8271. {
  8272. const BOOL fPreserveLastError = (fResult == FALSE);
  8273. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8274. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8275. if (fPreserveLastError)
  8276. SetLastError(dwLastError);
  8277. }
  8278. }
  8279. return fResult;
  8280. }
  8281. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_GetScrollInfo(HWND unnamed1,int code,LPSCROLLINFO unnamed2)
  8282. {
  8283. BOOL fResult = FALSE;
  8284. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int code,LPSCROLLINFO unnamed2);
  8285. static PFN s_pfn;
  8286. ULONG_PTR ulpCookie = 0;
  8287. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8288. if (!fActivateActCtxSuccess)
  8289. return fResult;
  8290. __try
  8291. {
  8292. if (s_pfn == NULL)
  8293. {
  8294. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_GetScrollInfo");
  8295. if (s_pfn == NULL)
  8296. __leave;
  8297. }
  8298. fResult = s_pfn(unnamed1,code,unnamed2);
  8299. }
  8300. __finally
  8301. {
  8302. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8303. {
  8304. const BOOL fPreserveLastError = (fResult == FALSE);
  8305. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8306. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8307. if (fPreserveLastError)
  8308. SetLastError(dwLastError);
  8309. }
  8310. }
  8311. return fResult;
  8312. }
  8313. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareFlatSB_GetScrollPos(HWND unnamed1,int code)
  8314. {
  8315. int nResult = 0 ;
  8316. typedef int (WINAPI* PFN)(HWND unnamed1,int code);
  8317. static PFN s_pfn;
  8318. ULONG_PTR ulpCookie = 0;
  8319. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8320. if (!fActivateActCtxSuccess)
  8321. return nResult;
  8322. __try
  8323. {
  8324. if (s_pfn == NULL)
  8325. {
  8326. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_GetScrollPos");
  8327. if (s_pfn == NULL)
  8328. __leave;
  8329. }
  8330. nResult = s_pfn(unnamed1,code);
  8331. }
  8332. __finally
  8333. {
  8334. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8335. {
  8336. const BOOL fPreserveLastError = (nResult == 0 );
  8337. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8338. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8339. if (fPreserveLastError)
  8340. SetLastError(dwLastError);
  8341. }
  8342. }
  8343. return nResult;
  8344. }
  8345. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_GetScrollProp(HWND unnamed1,int propIndex,LPINT unnamed2)
  8346. {
  8347. BOOL fResult = FALSE;
  8348. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int propIndex,LPINT unnamed2);
  8349. static PFN s_pfn;
  8350. ULONG_PTR ulpCookie = 0;
  8351. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8352. if (!fActivateActCtxSuccess)
  8353. return fResult;
  8354. __try
  8355. {
  8356. if (s_pfn == NULL)
  8357. {
  8358. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_GetScrollProp");
  8359. if (s_pfn == NULL)
  8360. __leave;
  8361. }
  8362. fResult = s_pfn(unnamed1,propIndex,unnamed2);
  8363. }
  8364. __finally
  8365. {
  8366. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8367. {
  8368. const BOOL fPreserveLastError = (fResult == FALSE);
  8369. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8370. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8371. if (fPreserveLastError)
  8372. SetLastError(dwLastError);
  8373. }
  8374. }
  8375. return fResult;
  8376. }
  8377. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_GetScrollPropPtr(HWND unnamed1,int propIndex,PINT_PTR unnamed2)
  8378. {
  8379. BOOL fResult = FALSE;
  8380. typedef BOOL (WINAPI* PFN)(HWND unnamed1,int propIndex,PINT_PTR unnamed2);
  8381. static PFN s_pfn;
  8382. ULONG_PTR ulpCookie = 0;
  8383. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8384. if (!fActivateActCtxSuccess)
  8385. return fResult;
  8386. __try
  8387. {
  8388. if (s_pfn == NULL)
  8389. {
  8390. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY(
  8391. #if defined(_WIN64)
  8392. "FlatSB_GetScrollPropPtr"
  8393. #else
  8394. "FlatSB_GetScrollProp"
  8395. #endif
  8396. );
  8397. if (s_pfn == NULL)
  8398. __leave;
  8399. }
  8400. fResult = s_pfn(unnamed1,propIndex,unnamed2);
  8401. }
  8402. __finally
  8403. {
  8404. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8405. {
  8406. const BOOL fPreserveLastError = (fResult == FALSE);
  8407. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8408. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8409. if (fPreserveLastError)
  8410. SetLastError(dwLastError);
  8411. }
  8412. }
  8413. return fResult;
  8414. }
  8415. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareFlatSB_SetScrollPos(HWND unnamed1,int code,int pos,BOOL fRedraw)
  8416. {
  8417. int nResult = 0 ;
  8418. typedef int (WINAPI* PFN)(HWND unnamed1,int code,int pos,BOOL fRedraw);
  8419. static PFN s_pfn;
  8420. ULONG_PTR ulpCookie = 0;
  8421. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8422. if (!fActivateActCtxSuccess)
  8423. return nResult;
  8424. __try
  8425. {
  8426. if (s_pfn == NULL)
  8427. {
  8428. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_SetScrollPos");
  8429. if (s_pfn == NULL)
  8430. __leave;
  8431. }
  8432. nResult = s_pfn(unnamed1,code,pos,fRedraw);
  8433. }
  8434. __finally
  8435. {
  8436. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8437. {
  8438. const BOOL fPreserveLastError = (nResult == 0 );
  8439. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8440. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8441. if (fPreserveLastError)
  8442. SetLastError(dwLastError);
  8443. }
  8444. }
  8445. return nResult;
  8446. }
  8447. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareFlatSB_SetScrollInfo(HWND unnamed1,int code,LPSCROLLINFO unnamed2,BOOL fRedraw)
  8448. {
  8449. int nResult = 0 ;
  8450. typedef int (WINAPI* PFN)(HWND unnamed1,int code,LPSCROLLINFO unnamed2,BOOL fRedraw);
  8451. static PFN s_pfn;
  8452. ULONG_PTR ulpCookie = 0;
  8453. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8454. if (!fActivateActCtxSuccess)
  8455. return nResult;
  8456. __try
  8457. {
  8458. if (s_pfn == NULL)
  8459. {
  8460. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_SetScrollInfo");
  8461. if (s_pfn == NULL)
  8462. __leave;
  8463. }
  8464. nResult = s_pfn(unnamed1,code,unnamed2,fRedraw);
  8465. }
  8466. __finally
  8467. {
  8468. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8469. {
  8470. const BOOL fPreserveLastError = (nResult == 0 );
  8471. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8472. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8473. if (fPreserveLastError)
  8474. SetLastError(dwLastError);
  8475. }
  8476. }
  8477. return nResult;
  8478. }
  8479. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareFlatSB_SetScrollRange(HWND unnamed1,int code,int min,int max,BOOL fRedraw)
  8480. {
  8481. int nResult = 0 ;
  8482. typedef int (WINAPI* PFN)(HWND unnamed1,int code,int min,int max,BOOL fRedraw);
  8483. static PFN s_pfn;
  8484. ULONG_PTR ulpCookie = 0;
  8485. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8486. if (!fActivateActCtxSuccess)
  8487. return nResult;
  8488. __try
  8489. {
  8490. if (s_pfn == NULL)
  8491. {
  8492. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_SetScrollRange");
  8493. if (s_pfn == NULL)
  8494. __leave;
  8495. }
  8496. nResult = s_pfn(unnamed1,code,min,max,fRedraw);
  8497. }
  8498. __finally
  8499. {
  8500. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8501. {
  8502. const BOOL fPreserveLastError = (nResult == 0 );
  8503. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8504. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8505. if (fPreserveLastError)
  8506. SetLastError(dwLastError);
  8507. }
  8508. }
  8509. return nResult;
  8510. }
  8511. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareFlatSB_SetScrollProp(HWND unnamed1,UINT index,INT_PTR newValue,BOOL unnamed2)
  8512. {
  8513. BOOL fResult = FALSE;
  8514. typedef BOOL (WINAPI* PFN)(HWND unnamed1,UINT index,INT_PTR newValue,BOOL unnamed2);
  8515. static PFN s_pfn;
  8516. ULONG_PTR ulpCookie = 0;
  8517. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8518. if (!fActivateActCtxSuccess)
  8519. return fResult;
  8520. __try
  8521. {
  8522. if (s_pfn == NULL)
  8523. {
  8524. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("FlatSB_SetScrollProp");
  8525. if (s_pfn == NULL)
  8526. __leave;
  8527. }
  8528. fResult = s_pfn(unnamed1,index,newValue,unnamed2);
  8529. }
  8530. __finally
  8531. {
  8532. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8533. {
  8534. const BOOL fPreserveLastError = (fResult == FALSE);
  8535. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8536. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8537. if (fPreserveLastError)
  8538. SetLastError(dwLastError);
  8539. }
  8540. }
  8541. return fResult;
  8542. }
  8543. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareInitializeFlatSB(HWND unnamed1)
  8544. {
  8545. BOOL fResult = FALSE;
  8546. typedef BOOL (WINAPI* PFN)(HWND unnamed1);
  8547. static PFN s_pfn;
  8548. ULONG_PTR ulpCookie = 0;
  8549. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8550. if (!fActivateActCtxSuccess)
  8551. return fResult;
  8552. __try
  8553. {
  8554. if (s_pfn == NULL)
  8555. {
  8556. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("InitializeFlatSB");
  8557. if (s_pfn == NULL)
  8558. __leave;
  8559. }
  8560. fResult = s_pfn(unnamed1);
  8561. }
  8562. __finally
  8563. {
  8564. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8565. {
  8566. const BOOL fPreserveLastError = (fResult == FALSE);
  8567. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8568. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8569. if (fPreserveLastError)
  8570. SetLastError(dwLastError);
  8571. }
  8572. }
  8573. return fResult;
  8574. }
  8575. ISOLATION_AWARE_INLINE HRESULT WINAPI IsolationAwareUninitializeFlatSB(HWND unnamed1)
  8576. {
  8577. HRESULT result = S_OK;
  8578. typedef HRESULT (WINAPI* PFN)(HWND unnamed1);
  8579. static PFN s_pfn;
  8580. ULONG_PTR ulpCookie = 0;
  8581. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8582. if (!fActivateActCtxSuccess)
  8583. return CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  8584. __try
  8585. {
  8586. if (s_pfn == NULL)
  8587. {
  8588. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("UninitializeFlatSB");
  8589. if (s_pfn == NULL)
  8590. {
  8591. result = CommctrlIsolationAwarePrivateJVaQPGbueRfhYg();
  8592. __leave;
  8593. }
  8594. }
  8595. result = s_pfn(unnamed1);
  8596. }
  8597. __finally
  8598. {
  8599. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8600. {
  8601. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8602. }
  8603. }
  8604. return result;
  8605. }
  8606. #if (_WIN32_IE >= 0x560)
  8607. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareSetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR dwRefData)
  8608. {
  8609. BOOL fResult = FALSE;
  8610. typedef BOOL (WINAPI* PFN)(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR dwRefData);
  8611. static PFN s_pfn;
  8612. ULONG_PTR ulpCookie = 0;
  8613. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8614. if (!fActivateActCtxSuccess)
  8615. return fResult;
  8616. __try
  8617. {
  8618. if (s_pfn == NULL)
  8619. {
  8620. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("SetWindowSubclass");
  8621. if (s_pfn == NULL)
  8622. __leave;
  8623. }
  8624. fResult = s_pfn(hWnd,pfnSubclass,uIdSubclass,dwRefData);
  8625. }
  8626. __finally
  8627. {
  8628. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8629. {
  8630. const BOOL fPreserveLastError = (fResult == FALSE);
  8631. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8632. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8633. if (fPreserveLastError)
  8634. SetLastError(dwLastError);
  8635. }
  8636. }
  8637. return fResult;
  8638. }
  8639. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareGetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR*pdwRefData)
  8640. {
  8641. BOOL fResult = FALSE;
  8642. typedef BOOL (WINAPI* PFN)(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR*pdwRefData);
  8643. static PFN s_pfn;
  8644. ULONG_PTR ulpCookie = 0;
  8645. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8646. if (!fActivateActCtxSuccess)
  8647. return fResult;
  8648. __try
  8649. {
  8650. if (s_pfn == NULL)
  8651. {
  8652. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("GetWindowSubclass");
  8653. if (s_pfn == NULL)
  8654. __leave;
  8655. }
  8656. fResult = s_pfn(hWnd,pfnSubclass,uIdSubclass,pdwRefData);
  8657. }
  8658. __finally
  8659. {
  8660. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8661. {
  8662. const BOOL fPreserveLastError = (fResult == FALSE);
  8663. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8664. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8665. if (fPreserveLastError)
  8666. SetLastError(dwLastError);
  8667. }
  8668. }
  8669. return fResult;
  8670. }
  8671. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareRemoveWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass)
  8672. {
  8673. BOOL fResult = FALSE;
  8674. typedef BOOL (WINAPI* PFN)(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass);
  8675. static PFN s_pfn;
  8676. ULONG_PTR ulpCookie = 0;
  8677. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8678. if (!fActivateActCtxSuccess)
  8679. return fResult;
  8680. __try
  8681. {
  8682. if (s_pfn == NULL)
  8683. {
  8684. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("RemoveWindowSubclass");
  8685. if (s_pfn == NULL)
  8686. __leave;
  8687. }
  8688. fResult = s_pfn(hWnd,pfnSubclass,uIdSubclass);
  8689. }
  8690. __finally
  8691. {
  8692. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8693. {
  8694. const BOOL fPreserveLastError = (fResult == FALSE);
  8695. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8696. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8697. if (fPreserveLastError)
  8698. SetLastError(dwLastError);
  8699. }
  8700. }
  8701. return fResult;
  8702. }
  8703. #endif /* (_WIN32_IE >= 0x560) */
  8704. ISOLATION_AWARE_INLINE LRESULT WINAPI IsolationAwareDefSubclassProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
  8705. {
  8706. LRESULT result = 0 ;
  8707. typedef LRESULT (WINAPI* PFN)(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
  8708. static PFN s_pfn;
  8709. ULONG_PTR ulpCookie = 0;
  8710. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8711. if (!fActivateActCtxSuccess)
  8712. return result;
  8713. __try
  8714. {
  8715. if (s_pfn == NULL)
  8716. {
  8717. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DefSubclassProc");
  8718. if (s_pfn == NULL)
  8719. __leave;
  8720. }
  8721. result = s_pfn(hWnd,uMsg,wParam,lParam);
  8722. }
  8723. __finally
  8724. {
  8725. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8726. {
  8727. const BOOL fPreserveLastError = (result == 0 );
  8728. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8729. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8730. if (fPreserveLastError)
  8731. SetLastError(dwLastError);
  8732. }
  8733. }
  8734. return result;
  8735. }
  8736. ISOLATION_AWARE_INLINE int WINAPI IsolationAwareDrawShadowText(HDC hdc,LPCWSTR pszText,UINT cch,RECT*prc,DWORD dwFlags,COLORREF crText,COLORREF crShadow,int ixOffset,int iyOffset)
  8737. {
  8738. int nResult = -1;
  8739. typedef int (WINAPI* PFN)(HDC hdc,LPCWSTR pszText,UINT cch,RECT*prc,DWORD dwFlags,COLORREF crText,COLORREF crShadow,int ixOffset,int iyOffset);
  8740. static PFN s_pfn;
  8741. ULONG_PTR ulpCookie = 0;
  8742. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8743. if (!fActivateActCtxSuccess)
  8744. return nResult;
  8745. __try
  8746. {
  8747. if (s_pfn == NULL)
  8748. {
  8749. s_pfn = (PFN)CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY("DrawShadowText");
  8750. if (s_pfn == NULL)
  8751. __leave;
  8752. }
  8753. nResult = s_pfn(hdc,pszText,cch,prc,dwFlags,crText,crShadow,ixOffset,iyOffset);
  8754. }
  8755. __finally
  8756. {
  8757. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8758. {
  8759. const BOOL fPreserveLastError = (nResult == -1);
  8760. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  8761. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8762. if (fPreserveLastError)
  8763. SetLastError(dwLastError);
  8764. }
  8765. }
  8766. return nResult;
  8767. }
  8768. ISOLATION_AWARE_INLINE FARPROC WINAPI CommctrlIsolationAwarePrivatetRgCebPnQQeRff_pbZPgYQP_QYY(LPCSTR pszProcName)
  8769. /* This function is shared by the other stubs in this header. */
  8770. {
  8771. FARPROC proc = NULL;
  8772. static HMODULE s_module;
  8773. BOOL fActivateActCtxSuccess = FALSE;
  8774. ULONG_PTR ulpCookie = 0;
  8775. const static IsolationAwarePrivatepBAFGnAG_zBqHyr_vAsB
  8776. c = { IsolationAwarePrivatezlybNQyVOeNeln, IsolationAwarePrivatezlybNQyVOeNelJ, "Comctl32.dll", L"Comctl32.dll" };
  8777. static IsolationAwarePrivatezHGnoyr_zBqHyr_vAsB m;
  8778. __try
  8779. {
  8780. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  8781. {
  8782. fActivateActCtxSuccess = IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  8783. if (!fActivateActCtxSuccess)
  8784. __leave;
  8785. }
  8786. proc = IsolationAwarePrivatezltRgCebPnQQeRff(&c, &m, pszProcName);
  8787. }
  8788. __finally
  8789. {
  8790. if (!IsolationAwarePrivateT_SqbjaYRiRY && fActivateActCtxSuccess)
  8791. {
  8792. const DWORD dwLastError = (proc == NULL) ? GetLastError() : NO_ERROR;
  8793. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  8794. if (proc == NULL)
  8795. SetLastError(dwLastError);
  8796. }
  8797. }
  8798. return proc;
  8799. }
  8800. #endif /* ISOLATION_AWARE_USE_STATIC_LIBRARY */
  8801. #define CreateMappedBitmap IsolationAwareCreateMappedBitmap
  8802. #define CreateStatusWindowA IsolationAwareCreateStatusWindowA
  8803. #define CreateStatusWindowW IsolationAwareCreateStatusWindowW
  8804. #define CreateToolbarEx IsolationAwareCreateToolbarEx
  8805. #define CreateUpDownControl IsolationAwareCreateUpDownControl
  8806. #define DPA_Create IsolationAwareDPA_Create
  8807. #define DPA_DeleteAllPtrs IsolationAwareDPA_DeleteAllPtrs
  8808. #define DPA_DeletePtr IsolationAwareDPA_DeletePtr
  8809. #define DPA_Destroy IsolationAwareDPA_Destroy
  8810. #define DPA_DestroyCallback IsolationAwareDPA_DestroyCallback
  8811. #define DPA_EnumCallback IsolationAwareDPA_EnumCallback
  8812. #define DPA_GetPtr IsolationAwareDPA_GetPtr
  8813. #define DPA_InsertPtr IsolationAwareDPA_InsertPtr
  8814. #define DPA_Search IsolationAwareDPA_Search
  8815. #define DPA_SetPtr IsolationAwareDPA_SetPtr
  8816. #define DPA_Sort IsolationAwareDPA_Sort
  8817. #define DSA_Create IsolationAwareDSA_Create
  8818. #define DSA_Destroy IsolationAwareDSA_Destroy
  8819. #define DSA_DestroyCallback IsolationAwareDSA_DestroyCallback
  8820. #define DSA_GetItemPtr IsolationAwareDSA_GetItemPtr
  8821. #define DSA_InsertItem IsolationAwareDSA_InsertItem
  8822. #define DefSubclassProc IsolationAwareDefSubclassProc
  8823. #define DrawInsert IsolationAwareDrawInsert
  8824. #define DrawShadowText IsolationAwareDrawShadowText
  8825. #define DrawStatusTextA IsolationAwareDrawStatusTextA
  8826. #define DrawStatusTextW IsolationAwareDrawStatusTextW
  8827. #define FlatSB_EnableScrollBar IsolationAwareFlatSB_EnableScrollBar
  8828. #define FlatSB_GetScrollInfo IsolationAwareFlatSB_GetScrollInfo
  8829. #define FlatSB_GetScrollPos IsolationAwareFlatSB_GetScrollPos
  8830. #define FlatSB_GetScrollProp IsolationAwareFlatSB_GetScrollProp
  8831. #if defined(FlatSB_GetScrollPropPtr)
  8832. #undef FlatSB_GetScrollPropPtr
  8833. #endif
  8834. #define FlatSB_GetScrollPropPtr IsolationAwareFlatSB_GetScrollPropPtr
  8835. #define FlatSB_GetScrollRange IsolationAwareFlatSB_GetScrollRange
  8836. #define FlatSB_SetScrollInfo IsolationAwareFlatSB_SetScrollInfo
  8837. #define FlatSB_SetScrollPos IsolationAwareFlatSB_SetScrollPos
  8838. #define FlatSB_SetScrollProp IsolationAwareFlatSB_SetScrollProp
  8839. #define FlatSB_SetScrollRange IsolationAwareFlatSB_SetScrollRange
  8840. #define FlatSB_ShowScrollBar IsolationAwareFlatSB_ShowScrollBar
  8841. #define GetEffectiveClientRect IsolationAwareGetEffectiveClientRect
  8842. #define GetMUILanguage IsolationAwareGetMUILanguage
  8843. #define GetWindowSubclass IsolationAwareGetWindowSubclass
  8844. #define ImageList_Add IsolationAwareImageList_Add
  8845. #define ImageList_AddMasked IsolationAwareImageList_AddMasked
  8846. #define ImageList_BeginDrag IsolationAwareImageList_BeginDrag
  8847. #define ImageList_Copy IsolationAwareImageList_Copy
  8848. #define ImageList_Create IsolationAwareImageList_Create
  8849. #define ImageList_Destroy IsolationAwareImageList_Destroy
  8850. #define ImageList_DragEnter IsolationAwareImageList_DragEnter
  8851. #define ImageList_DragLeave IsolationAwareImageList_DragLeave
  8852. #define ImageList_DragMove IsolationAwareImageList_DragMove
  8853. #define ImageList_DragShowNolock IsolationAwareImageList_DragShowNolock
  8854. #define ImageList_Draw IsolationAwareImageList_Draw
  8855. #define ImageList_DrawEx IsolationAwareImageList_DrawEx
  8856. #define ImageList_DrawIndirect IsolationAwareImageList_DrawIndirect
  8857. #define ImageList_Duplicate IsolationAwareImageList_Duplicate
  8858. #define ImageList_EndDrag IsolationAwareImageList_EndDrag
  8859. #define ImageList_GetBkColor IsolationAwareImageList_GetBkColor
  8860. #define ImageList_GetDragImage IsolationAwareImageList_GetDragImage
  8861. #define ImageList_GetIcon IsolationAwareImageList_GetIcon
  8862. #define ImageList_GetIconSize IsolationAwareImageList_GetIconSize
  8863. #define ImageList_GetImageCount IsolationAwareImageList_GetImageCount
  8864. #define ImageList_GetImageInfo IsolationAwareImageList_GetImageInfo
  8865. #define ImageList_LoadImageA IsolationAwareImageList_LoadImageA
  8866. #define ImageList_LoadImageW IsolationAwareImageList_LoadImageW
  8867. #define ImageList_Merge IsolationAwareImageList_Merge
  8868. #define ImageList_Read IsolationAwareImageList_Read
  8869. #define ImageList_ReadEx IsolationAwareImageList_ReadEx
  8870. #define ImageList_Remove IsolationAwareImageList_Remove
  8871. #define ImageList_Replace IsolationAwareImageList_Replace
  8872. #define ImageList_ReplaceIcon IsolationAwareImageList_ReplaceIcon
  8873. #define ImageList_SetBkColor IsolationAwareImageList_SetBkColor
  8874. #define ImageList_SetDragCursorImage IsolationAwareImageList_SetDragCursorImage
  8875. #define ImageList_SetIconSize IsolationAwareImageList_SetIconSize
  8876. #define ImageList_SetImageCount IsolationAwareImageList_SetImageCount
  8877. #define ImageList_SetOverlayImage IsolationAwareImageList_SetOverlayImage
  8878. #define ImageList_Write IsolationAwareImageList_Write
  8879. #define ImageList_WriteEx IsolationAwareImageList_WriteEx
  8880. #define InitCommonControls IsolationAwareInitCommonControls
  8881. #define InitCommonControlsEx IsolationAwareInitCommonControlsEx
  8882. #define InitMUILanguage IsolationAwareInitMUILanguage
  8883. #define InitializeFlatSB IsolationAwareInitializeFlatSB
  8884. #define LBItemFromPt IsolationAwareLBItemFromPt
  8885. #define MakeDragList IsolationAwareMakeDragList
  8886. #define MenuHelp IsolationAwareMenuHelp
  8887. #define RemoveWindowSubclass IsolationAwareRemoveWindowSubclass
  8888. #define SetWindowSubclass IsolationAwareSetWindowSubclass
  8889. #define ShowHideMenuCtl IsolationAwareShowHideMenuCtl
  8890. #define Str_SetPtrW IsolationAwareStr_SetPtrW
  8891. #define UninitializeFlatSB IsolationAwareUninitializeFlatSB
  8892. #define _TrackMouseEvent IsolationAware_TrackMouseEvent
  8893. #endif /* ISOLATION_AWARE_ENABLED */
  8894. #endif /* RC */
  8895. #ifdef __cplusplus
  8896. }
  8897. #endif
  8898. #endif
  8899. #endif // _INC_COMMCTRL