/*****************************************************************************\
* *
* commctrl.h - - Interface for the Windows Common Controls *
* *
* Version 1.2 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#ifndef _INC_COMMCTRL
#define _INC_COMMCTRL
#ifndef _WINRESRC_
#ifndef _WIN32_IE
#define _WIN32_IE 0x0501
#else
#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
#error _WIN32_IE setting conflicts with _WIN32_WINNT setting
#endif
#endif
#endif
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef LONG HRESULT;
#endif // _HRESULT_DEFINED
#ifndef NOUSER
//
// Define API decoration for direct importing of DLL references.
//
#ifndef WINCOMMCTRLAPI
#if !defined(_COMCTL32_) && defined(_WIN32)
#define WINCOMMCTRLAPI DECLSPEC_IMPORT
#else
#define WINCOMMCTRLAPI
#endif
#endif // WINCOMMCTRLAPI
//
// For compilers that don't support nameless unions
//
#ifndef DUMMYUNIONNAME
#ifdef NONAMELESSUNION
#define DUMMYUNIONNAME u
#define DUMMYUNIONNAME2 u2
#define DUMMYUNIONNAME3 u3
#define DUMMYUNIONNAME4 u4
#define DUMMYUNIONNAME5 u5
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#define DUMMYUNIONNAME4
#define DUMMYUNIONNAME5
#endif
#endif // DUMMYUNIONNAME
#ifdef __cplusplus
extern "C" {
#endif
//
// Users of this header may define any number of these constants to avoid
// the definitions of each functional group.
//
// NOTOOLBAR Customizable bitmap-button toolbar control.
// NOUPDOWN Up and Down arrow increment/decrement control.
// NOSTATUSBAR Status bar control.
// NOMENUHELP APIs to help manage menus, especially with a status bar.
// NOTRACKBAR Customizable column-width tracking control.
// NODRAGLIST APIs to make a listbox source and sink drag&drop actions.
// NOPROGRESS Progress gas gauge.
// NOHOTKEY HotKey control
// NOHEADER Header bar control.
// NOIMAGEAPIS ImageList apis.
// NOLISTVIEW ListView control.
// NOTREEVIEW TreeView control.
// NOTABCONTROL Tab control.
// NOANIMATE Animate control.
// NOBUTTON Button control.
// NOSTATIC Static control.
// NOEDIT Edit control.
// NOLISTBOX Listbox control.
// NOCOMBOBOX Combobox control.
// NOSCROLLBAR Scrollbar control.
//
//=============================================================================
#include <prsht.h>
#ifndef SNDMSG
#ifdef __cplusplus
#ifndef _MAC
#define SNDMSG ::SendMessage
#else
#define SNDMSG ::AfxSendMessage
#endif
#else
#ifndef _MAC
#define SNDMSG SendMessage
#else
#define SNDMSG AfxSendMessage
#endif //_MAC
#endif
#endif // ifndef SNDMSG
#ifdef _MAC
#ifndef RC_INVOKED
#ifndef _WLM_NOFORCE_LIBS
#ifndef _WLMDLL
#ifdef _DEBUG
#pragma comment(lib, "comctld.lib")
#else
#pragma comment(lib, "comctl.lib")
#endif
#pragma comment(linker, "/macres:comctl.rsc")
#else
#ifdef _DEBUG
#pragma comment(lib, "msvcctld.lib")
#else
#pragma comment(lib, "msvcctl.lib")
#endif
#endif // _WLMDLL
#endif // _WLM_NOFORCE_LIBS
#endif // RC_INVOKED
#endif //_MAC
WINCOMMCTRLAPI void WINAPI InitCommonControls(void);
#if (_WIN32_IE >= 0x0300)
typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize; // size of this structure
DWORD dwICC; // flags indicating which classes to be initialized
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
#define ICC_LISTVIEW_CLASSES 0x00000001 // listview, header
#define ICC_TREEVIEW_CLASSES 0x00000002 // treeview, tooltips
#define ICC_BAR_CLASSES 0x00000004 // toolbar, statusbar, trackbar, tooltips
#define ICC_TAB_CLASSES 0x00000008 // tab, tooltips
#define ICC_UPDOWN_CLASS 0x00000010 // updown
#define ICC_PROGRESS_CLASS 0x00000020 // progress
#define ICC_HOTKEY_CLASS 0x00000040 // hotkey
#define ICC_ANIMATE_CLASS 0x00000080 // animate
#define ICC_WIN95_CLASSES 0x000000FF
#define ICC_DATE_CLASSES 0x00000100 // month picker, date picker, time picker, updown
#define ICC_USEREX_CLASSES 0x00000200 // comboex
#define ICC_COOL_CLASSES 0x00000400 // rebar (coolbar) control
#if (_WIN32_IE >= 0x0400)
#define ICC_INTERNET_CLASSES 0x00000800
#define ICC_PAGESCROLLER_CLASS 0x00001000 // page scroller
#define ICC_NATIVEFNTCTL_CLASS 0x00002000 // native font control
#endif
#if (_WIN32_WINNT >= 0x501)
#define ICC_STANDARD_CLASSES 0x00004000
#define ICC_LINK_CLASS 0x00008000
#endif
WINCOMMCTRLAPI BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
#endif // _WIN32_IE >= 0x0300
#define ODT_HEADER 100
#define ODT_TAB 101
#define ODT_LISTVIEW 102
//====== Ranges for control message IDs =======================================
#define LVM_FIRST 0x1000 // ListView messages
#define TV_FIRST 0x1100 // TreeView messages
#define HDM_FIRST 0x1200 // Header messages
#define TCM_FIRST 0x1300 // Tab control messages
#if (_WIN32_IE >= 0x0400)
#define PGM_FIRST 0x1400 // Pager control messages
#if (_WIN32_WINNT >= 0x501)
#define ECM_FIRST 0x1500 // Edit control messages
#define BCM_FIRST 0x1600 // Button control messages
#define CBM_FIRST 0x1700 // Combobox control messages
#endif
#define CCM_FIRST 0x2000 // Common control shared messages
#define CCM_LAST (CCM_FIRST + 0x200)
#define CCM_SETBKCOLOR (CCM_FIRST + 1) // lParam is bkColor
typedef struct tagCOLORSCHEME {
DWORD dwSize;
COLORREF clrBtnHighlight; // highlight color
COLORREF clrBtnShadow; // shadow color
} COLORSCHEME, *LPCOLORSCHEME;
#define CCM_SETCOLORSCHEME (CCM_FIRST + 2) // lParam is color scheme
#define CCM_GETCOLORSCHEME (CCM_FIRST + 3) // fills in COLORSCHEME pointed to by lParam
#define CCM_GETDROPTARGET (CCM_FIRST + 4)
#define CCM_SETUNICODEFORMAT (CCM_FIRST + 5)
#define CCM_GETUNICODEFORMAT (CCM_FIRST + 6)
#if (_WIN32_IE >= 0x0500)
#if (_WIN32_WINNT >= 0x501)
#define COMCTL32_VERSION 6
#else
#define COMCTL32_VERSION 5
#endif
#define CCM_SETVERSION (CCM_FIRST + 0x7)
#define CCM_GETVERSION (CCM_FIRST + 0x8)
#define CCM_SETNOTIFYWINDOW (CCM_FIRST + 0x9) // wParam == hwndParent.
#if (_WIN32_WINNT >= 0x501)
#define CCM_SETWINDOWTHEME (CCM_FIRST + 0xb)
#define CCM_DPISCALE (CCM_FIRST + 0xc) // wParam == Awareness
#endif
#endif // (_WIN32_IE >= 0x0500)
#endif // (_WIN32_IE >= 0x0400)
#if (_WIN32_IE >= 0x0400)
// for tooltips
#define INFOTIPSIZE 1024
#endif
//====== WM_NOTIFY Macros =====================================================
#define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
(fn)((hwnd), (int)(wParam), (NMHDR *)(lParam))
#define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
(LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR *)(pnmhdr))
//====== Generic WM_NOTIFY notification codes =================================
#define NM_OUTOFMEMORY (NM_FIRST-1)
#define NM_CLICK (NM_FIRST-2) // uses NMCLICK struct
#d