📄 osdcommctrl.h
字号:
/*
* Common controls definitions
*
* Copyright (C) the Wine project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_COMMCTRL_H
#define __WINE_COMMCTRL_H
#include "osdwindef.h"
#include "osdwinuser.h"
#include "osdwinbase.h"
#ifdef __cplusplus
extern "C" {
#endif
#define WINELIB_NAME_AW(func) func##A
#define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
/* Property sheet / Wizard */
#define IDD_PROPSHEET 1006
#define IDD_WIZARD 1020
#define IDC_TABCONTROL 12320
#define IDC_APPLY_BUTTON 12321
#define IDC_BACK_BUTTON 12323
#define IDC_NEXT_BUTTON 12324
#define IDC_FINISH_BUTTON 12325
#define IDC_SUNKEN_LINE 12326
#define IDC_SUNKEN_LINEHEADER 12327
#define IDS_CLOSE 4160
/* Toolbar customization dialog */
#define IDD_TBCUSTOMIZE 200
#define IDC_AVAILBTN_LBOX 201
#define IDC_RESET_BTN 202
#define IDC_TOOLBARBTN_LBOX 203
#define IDC_REMOVE_BTN 204
#define IDC_HELP_BTN 205
#define IDC_MOVEUP_BTN 206
#define IDC_MOVEDN_BTN 207
#define IDS_SEPARATOR 1024
/* Toolbar imagelist bitmaps */
#define IDB_STD_SMALL 120
#define IDB_STD_LARGE 121
#define IDB_VIEW_SMALL 124
#define IDB_VIEW_LARGE 125
#define IDB_HIST_SMALL 130
#define IDB_HIST_LARGE 131
/* Month calendar month menu popup */
#define IDD_MCMONTHMENU 300
#define IDM_JAN 301
#define IDM_FEB 302
#define IDM_MAR 303
#define IDM_APR 304
#define IDM_MAY 305
#define IDM_JUN 306
#define IDM_JUL 307
#define IDM_AUG 308
#define IDM_SEP 309
#define IDM_OCT 310
#define IDM_NOV 311
#define IDM_DEC 312
#define IDM_TODAY 4163
#define IDM_GOTODAY 4164
//BOOL WINAPI ShowHideMenuCtl (HWND, UINT_PTR, LPINT);
VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
VOID WINAPI InitCommonControls (VOID);
typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize;
DWORD dwICC;
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
//LANGID WINAPI GetMUILanguage (VOID);
//VOID WINAPI InitMUILanguage (LANGID uiLang);
#define COMCTL32_VERSION 5 /* dll version */
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
#endif
#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) */
#define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
#define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
#define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
#define ICC_STANDARD_CLASSES 0x00004000
#define ICC_LINK_CLASS 0x00008000
/* common control styles */
#define CCS_TOP 0x00000001L
#define CCS_NOMOVEY 0x00000002L
#define CCS_BOTTOM 0x00000003L
#define CCS_NORESIZE 0x00000004L
#define CCS_NOPARENTALIGN 0x00000008L
#define CCS_ADJUSTABLE 0x00000020L
#define CCS_NODIVIDER 0x00000040L
#define CCS_VERT 0x00000080L
#define CCS_LEFT (CCS_VERT|CCS_TOP)
#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
#define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
/* common control shared messages */
#define CCM_FIRST 0x2000
#define CCM_SETBKCOLOR (CCM_FIRST+0x1) /* lParam = bkColor */
#define CCM_SETCOLORSCHEME (CCM_FIRST+0x2) /* lParam = COLORSCHEME struct ptr */
#define CCM_GETCOLORSCHEME (CCM_FIRST+0x3) /* lParam = COLORSCHEME struct ptr */
#define CCM_GETDROPTARGET (CCM_FIRST+0x4)
#define CCM_SETUNICODEFORMAT (CCM_FIRST+0x5)
#define CCM_GETUNICODEFORMAT (CCM_FIRST+0x6)
#define CCM_SETVERSION (CCM_FIRST+0x7)
#define CCM_GETVERSION (CCM_FIRST+0x8)
#define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9) /* wParam = hwndParent */
#define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
#define CCM_DPISCALE (CCM_FIRST+0xc)
/* common notification codes (WM_NOTIFY)*/
#define NM_FIRST (0U- 0U)
#define NM_LAST (0U- 99U)
#define NM_OUTOFMEMORY (NM_FIRST-1)
#define NM_CLICK (NM_FIRST-2)
#define NM_DBLCLK (NM_FIRST-3)
#define NM_RETURN (NM_FIRST-4)
#define NM_RCLICK (NM_FIRST-5)
#define NM_RDBLCLK (NM_FIRST-6)
#define NM_SETFOCUS (NM_FIRST-7)
#define NM_KILLFOCUS (NM_FIRST-8)
#define NM_CUSTOMDRAW (NM_FIRST-12)
#define NM_HOVER (NM_FIRST-13)
#define NM_NCHITTEST (NM_FIRST-14)
#define NM_KEYDOWN (NM_FIRST-15)
#define NM_RELEASEDCAPTURE (NM_FIRST-16)
#define NM_SETCURSOR (NM_FIRST-17)
#define NM_CHAR (NM_FIRST-18)
#define NM_TOOLTIPSCREATED (NM_FIRST-19)
#define NM_LDOWN (NM_FIRST-20)
#define NM_RDOWN (NM_FIRST-21)
#define NM_THEMECHANGED (NM_FIRST-22)
#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))
/* callback constants */
#define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
#define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
#define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
#define I_IMAGECALLBACK (-1)
#define I_IMAGENONE (-2)
#define I_INDENTCALLBACK (-1)
#define I_CHILDRENCALLBACK (-1)
#define I_GROUPIDCALLBACK (-1)
#define I_GROUPIDNONE (-2)
#define I_COLUMNSCALLBACK ((UINT)-1)
/* owner drawn types */
#define ODT_HEADER 100
#define ODT_TAB 101
#define ODT_LISTVIEW 102
/* common notification structures */
typedef struct tagNMTOOLTIPSCREATED
{
NMHDR hdr;
HWND hwndToolTips;
} NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
typedef struct tagNMMOUSE
{
NMHDR hdr;
DWORD dwItemSpec;
DWORD dwItemData;
POINT pt;
DWORD dwHitInfo; /* info where on item or control the mouse is */
} NMMOUSE, *LPNMMOUSE;
typedef struct tagNMOBJECTNOTIFY
{
NMHDR hdr;
int iItem;
#ifdef __IID_DEFINED__
const IID *piid;
#else
const void *piid;
#endif
void *pObject;
HRESULT hResult;
DWORD dwFlags;
} NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
typedef struct tagNMKEY
{
NMHDR hdr;
UINT nVKey;
UINT uFlags;
} NMKEY, *LPNMKEY;
typedef struct tagNMCHAR
{
NMHDR hdr;
UINT ch;
DWORD dwItemPrev; /* Item previously selected */
DWORD dwItemNext; /* Item to be selected */
} NMCHAR, *LPNMCHAR;
#ifndef CCSIZEOF_STRUCT
#define CCSIZEOF_STRUCT(name, member) \
(((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
sizeof(((name*)0)->member))
#endif
/* This is only for Winelib applications. DON't use it wine itself!!! */
#ifndef SNDMSG
#ifdef __cplusplus
#define SNDMSG ::SendMessage
#else /* __cplusplus */
#define SNDMSG SendMessage
#endif /* __cplusplus */
#endif /* SNDMSG */
#ifdef __cplusplus
#define SNDMSGA ::SendMessageA
#define SNDMSGW ::SendMessageW
#else
#define SNDMSGA SendMessage
#define SNDMSGW SendMessage
#endif
/* Custom Draw messages */
#define CDRF_DODEFAULT 0x0
#define CDRF_NEWFONT 0x00000002
#define CDRF_SKIPDEFAULT 0x00000004
#define CDRF_NOTIFYPOSTPAINT 0x00000010
#define CDRF_NOTIFYITEMDRAW 0x00000020
#define CDRF_NOTIFYSUBITEMDRAW 0x00000020
#define CDRF_NOTIFYPOSTERASE 0x00000040
#define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
/* drawstage flags */
#define CDDS_PREPAINT 1
#define CDDS_POSTPAINT 2
#define CDDS_PREERASE 3
#define CDDS_POSTERASE 4
#define CDDS_ITEM 0x00010000
#define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
#define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
#define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
#define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
#define CDDS_SUBITEM 0x00020000
/* itemState flags */
#define CDIS_SELECTED 0x0001
#define CDIS_GRAYED 0x0002
#define CDIS_DISABLED 0x0004
#define CDIS_CHECKED 0x0008
#define CDIS_FOCUS 0x0010
#define CDIS_DEFAULT 0x0020
#define CDIS_HOT 0x0040
#define CDIS_MARKED 0x0080
#define CDIS_INDETERMINATE 0x0100
#define CDIS_SHOWKEYBOARDCUES 0x0200
typedef struct tagNMCUSTOMDRAWINFO
{
NMHDR hdr;
DWORD dwDrawStage;
HDC hdc;
RECT rc;
DWORD dwItemSpec;
UINT uItemState;
LPARAM lItemlParam;
} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
typedef struct tagNMTTCUSTOMDRAW
{
NMCUSTOMDRAW nmcd;
UINT uDrawFlags;
} NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
/* StatusWindow */
#define STATUSCLASSNAME "msctls_statusbar32"
#define SBT_NOBORDERS 0x0100
#define SBT_POPOUT 0x0200
#define SBT_RTLREADING 0x0400 /* not supported */
#define SBT_TOOLTIPS 0x0800
#define SBT_OWNERDRAW 0x1000
#define SBARS_SIZEGRIP 0x0100
#define SB_SIMPLEID 0x00ff
#define SB_SETTEXTA (WM_USER+1)
#define SB_SETTEXTW (WM_USER+11)
#define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
#define SB_GETTEXTA (WM_USER+2)
#define SB_GETTEXTW (WM_USER+13)
#define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
#define SB_GETTEXTLENGTHA (WM_USER+3)
#define SB_GETTEXTLENGTHW (WM_USER+12)
#define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
#define SB_SETPARTS (WM_USER+4)
#define SB_SETBORDERS (WM_USER+5)
#define SB_GETPARTS (WM_USER+6)
#define SB_GETBORDERS (WM_USER+7)
#define SB_SETMINHEIGHT (WM_USER+8)
#define SB_SIMPLE (WM_USER+9)
#define SB_GETRECT (WM_USER+10)
#define SB_ISSIMPLE (WM_USER+14)
#define SB_SETICON (WM_USER+15)
#define SB_SETTIPTEXTA (WM_USER+16)
#define SB_SETTIPTEXTW (WM_USER+17)
#define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
#define SB_GETTIPTEXTA (WM_USER+18)
#define SB_GETTIPTEXTW (WM_USER+19)
#define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
#define SB_GETICON (WM_USER+20)
#define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
#define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
#define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
#define SBN_FIRST (0U-880U)
#define SBN_LAST (0U-899U)
#define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
HWND WINAPI CreateStatusWindow (LONG, LPCSTR, HWND, UINT);
//HWND WINAPI CreateStatusWindowW (LONG, LPCWSTR, HWND, UINT);
#define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
VOID WINAPI DrawStatusText (HDC, LPRECT, LPCSTR, UINT);
//VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
#define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
HINSTANCE, HWND, UINT*);
typedef struct tagCOLORSCHEME
{
DWORD dwSize;
COLORREF clrBtnHighlight; /* highlight color */
COLORREF clrBtnShadow; /* shadow color */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -