📄 commctrl.h
字号:
#define UPDOWN_CLASS "msctls_updown"
#endif
/* Structures */
typedef struct _UDACCEL {
UINT nSec;
UINT nInc;
} UDACCEL, FAR *LPUDACCEL;
#define UD_MAXVAL 0x7fff
#define UD_MINVAL (-UD_MAXVAL)
/* STYLE BITS */
#define UDS_WRAP 0x0001
#define UDS_SETBUDDYINT 0x0002
#define UDS_ALIGNRIGHT 0x0004
#define UDS_ALIGNLEFT 0x0008
#define UDS_AUTOBUDDY 0x0010
#define UDS_ARROWKEYS 0x0020
#define UDS_HORZ 0x0040
#define UDS_NOTHOUSANDS 0x0080
/* MESSAGES */
#define UDM_SETRANGE (WM_USER+101)
/* wParam: not used, 0
// lParam: short LOWORD, new upper; short HIWORD, new lower limit
// return: not used
*/
#define UDM_GETRANGE (WM_USER+102)
/* wParam: not used, 0
// lParam: not used, 0
// return: short LOWORD, upper; short HIWORD, lower limit
*/
#define UDM_SETPOS (WM_USER+103)
/* wParam: not used, 0
// lParam: short LOWORD, new pos; HIWORD not used, 0
// return: short LOWORD, old pos; HIWORD not used
*/
#define UDM_GETPOS (WM_USER+104)
/* wParam: not used, 0
// lParam: not used, 0
// return: short LOWORD, current pos; HIWORD not used
*/
#define UDM_SETBUDDY (WM_USER+105)
/* wParam: HWND, new buddy
// lParam: not used, 0
// return: HWND LOWORD, old buddy; HIWORD not used
*/
#define UDM_GETBUDDY (WM_USER+106)
/* wParam: not used, 0
// lParam: not used, 0
// return: HWND LOWORD, current buddy; HIWORD not used
*/
#define UDM_SETACCEL (WM_USER+107)
/* wParam: UINT, number of acceleration steps
// lParam: LPUDACCEL, pointer to array of UDACCEL elements
// Elements should be sorted in increasing nSec order.
// return: BOOL LOWORD, nonzero if successful; HIWORD not used
*/
#define UDM_GETACCEL (WM_USER+108)
/* wParam: UINT, number of elements in the UDACCEL array
// lParam: LPUDACCEL, pointer to UDACCEL buffer to receive array
// return: UINT LOWORD, number of elements returned in buffer
*/
#define UDM_SETBASE (WM_USER+109)
/* wParam: UINT, new radix base (10 for decimal, 16 for hex, etc.)
// lParam: not used, 0
// return: not used
*/
#define UDM_GETBASE (WM_USER+110)
/* wParam: not used, 0
// lParam: not used, 0
// return: UINT LOWORD, current radix base; HIWORD not used
*/
/* NOTIFICATIONS */
/* WM_VSCROLL
// Note that unlike a scrollbar, the position is automatically changed by
// the control, and the LOWORD(lParam) is always the new position. Only
// SB_THUMBTRACK and SB_THUMBPOSITION scroll codes are sent in the wParam.
*/
/* HELPER APIs */
WINCOMMCTRLAPI HWND WINAPI CreateUpDownControl(DWORD dwStyle, int x, int y, int cx, int cy,
HWND hParent, int nID, HINSTANCE hInst,
HWND hBuddy,
int nUpper, int nLower, int nPos);
/* Does the CreateWindow call followed by setting the various
// state information:
// hBuddy The companion control (usually an "edit").
// nUpper The range limit corresponding to the upper button.
// nLower The range limit corresponding to the lower button.
// nPos The initial position.
// Returns the handle to the control or NULL on failure.
*/
typedef struct _NM_UPDOWN
{
NMHDR hdr;
int iPos;
int iDelta;
} NM_UPDOWN, FAR *LPNM_UPDOWN;
// this will be received Before the WM_VSCROLL notification.
// this gives the parent a chance to bail (return non 0) or change the delta
#define UDN_DELTAPOS (UDN_FIRST - 1)
#endif /* NOUPDOWN */
/*/////////////////////////////////////////////////////////////////////////*/
// progress indicator
#ifndef NOPROGRESS
#ifdef _WIN32
#define PROGRESS_CLASS "msctls_progress32"
#else
#define PROGRESS_CLASS "msctls_progress"
#endif
/*
// OVERVIEW:
//
// The progress bar control is a "gas gauge" that can be used to show the
// progress of a lengthy operation.
//
// The application sets the range and current position (similar to a
// scrollbar) and has the ability to advance the current position in
// a variety of ways.
//
// When PBM_STEPIT is used to advance the current position, the gauge
// will wrap when it reaches the end and start again at the start.
// The position is clamped at either end in other cases.
//
*/
/*/////////////////////////////////////////////////////////////////////////*/
/* STYLE BITS */
/* MESSAGES */
#define PBM_SETRANGE (WM_USER+1)
/* wParam: not used, 0
// lParam: int LOWORD, bottom of range; int HIWORD top of range
// return: int LOWORD, previous bottom; int HIWORD old top
*/
#define PBM_SETPOS (WM_USER+2)
/* wParam: int new position
// lParam: not used, 0
// return: int LOWORD, previous position; HIWORD not used
*/
#define PBM_DELTAPOS (WM_USER+3)
/* wParam: int amount to advance current position
// lParam: not used, 0
// return: int LOWORD, previous position; HIWORD not used
*/
#define PBM_SETSTEP (WM_USER+4)
/* wParam: int new step
// lParam: not used, 0
// return: int LOWORD, previous step; HIWORD not used
*/
#define PBM_STEPIT (WM_USER+5)
/* advance current position by current step
// wParam: not used 0
// lParam: not used, 0
// return: int LOWORD, previous position; HIWORD not used
*/
#endif /* NOPROGRESS */
#ifndef NOHOTKEY
/*
// OVERVIEW: k
//
// The hotkey control is designed as an edit control for hotkey
// entry. the application supplies a set of control/alt/shift
// combinations that are considered invalid and a default combination
// to be used OR'd with an invalid combination.
//
// Hotkey values are returned as a pair of bytes, one for the
// virtual key code of the key and the other specifying the
// modifier combinations used with the key.
//
*/
// possible modifiers
#define HOTKEYF_SHIFT 0x01
#define HOTKEYF_CONTROL 0x02
#define HOTKEYF_ALT 0x04
#define HOTKEYF_EXT 0x08 // keyboard extended bit
// possible modifier combinations (for defining invalid combos)
#define HKCOMB_NONE 0x0001 // no modifiers
#define HKCOMB_S 0x0002 // only shift
#define HKCOMB_C 0x0004 // only control
#define HKCOMB_A 0x0008 // only alt
#define HKCOMB_SC 0x0010 // shift+control
#define HKCOMB_SA 0x0020 // shift+alt
#define HKCOMB_CA 0x0040 // control+alt
#define HKCOMB_SCA 0x0080 // shift+control+alt
// wHotkey: WORD lobyte, virtual key code
// WORD hibyte, modifers (combination of HOTKEYF_).
#define HKM_SETHOTKEY (WM_USER+1)
/* wParam: wHotkey;
// lParam: not used, 0
// return: not used
*/
#define HKM_GETHOTKEY (WM_USER+2)
/* wParam: not used, 0
// lParam: not used, 0
// return: wHotkey;
*/
#define HKM_SETRULES (WM_USER+3)
/* wParam: UINT, invalid modifier combinations (using HKCOMB_*)
// lParam: UINT loword, default modifier combination (using HOTKEYF_*)
// hiword not used
// return: not used
*/
#ifdef _WIN32
#define HOTKEY_CLASS "msctls_hotkey32"
#else
#define HOTKEY_CLASS "msctls_hotkey"
#endif
#endif /* NOHOTKEY */
/*/////////////////////////////////////////////////////////////////////////*/
/* Note that the following flags are checked every time the window gets a
* WM_SIZE message, so the style of the window can be changed "on-the-fly".
* If NORESIZE is set, then the app is responsible for all control placement
* and sizing. If NOPARENTALIGN is set, then the app is responsible for
* placement. If neither is set, the app just needs to send a WM_SIZE
* message for the window to be positioned and sized correctly whenever the
* parent window size changes.
* Note that for STATUS bars, CCS_BOTTOM is the default, for HEADER bars,
* CCS_NOMOVEY is the default, and for TOOL bars, CCS_TOP is the default.
*/
#define CCS_TOP 0x00000001L
/* This flag means the status bar should be "top" aligned. If the
* NOPARENTALIGN flag is set, then the control keeps the same top, left, and
* width measurements, but the height is adjusted to the default, otherwise
* the status bar is positioned at the top of the parent window such that
* its client area is as wide as the parent window and its client origin is
* the same as its parent.
* Similarly, if this flag is not set, the control is bottom-aligned, either
* with its original rect or its parent rect, depending on the NOPARENTALIGN
* flag.
*/
#define CCS_NOMOVEY 0x00000002L
/* This flag means the control may be resized and moved horizontally (if the
* CCS_NORESIZE flag is not set), but it will not move vertically when a
* WM_SIZE message comes through.
*/
#define CCS_BOTTOM 0x00000003L
/* Same as CCS_TOP, only on the bottom.
*/
#define CCS_NORESIZE 0x00000004L
/* This flag means that the size given when creating or resizing is exact,
* and the control should not resize itself to the default height or width
*/
#define CCS_NOPARENTALIGN 0x00000008L
/* This flag means that the control should not "snap" to the top or bottom
* or the parent window, but should keep the same placement it was given
*/
#define CCS_ADJUSTABLE 0x00000020L
/* This allows a toolbar (header bar?) to be configured by the user.
*/
#define CCS_NODIVIDER 0x00000040L
/* Don't draw the 2 pixel highlight at top of control (toolbar)
*/
/*/////////////////////////////////////////////////////////////////////////*/
//================ LISTVIEW APIS ===========================================
//
// Class name: SysListView (WC_LISTVIEW)
//
// The SysListView control provides for a group of items which are displayed
// as a name and/or an associated icon and associated sub-items, in one of
// several organizations, depending on current style settings:
// * The Icon Format (LVS_ICON)
// The control arranges standard-sized icons on an invisible grid
// with their text caption below the icon. The user can drag icons to
// rearrange them freely, even overlapping each other.
// * The Small Icon Format (LVS_SMALLICON)
// The control arranges half-sized icons on an invisible columnar grid
// like a multi-column owner-draw listbox, with the caption of each
// item to the icon's right. The user can still rearrange items
// freely to taste. Converting from LVS_ICON to LVS_SMALLICON and back
// will attempt to preserve approximate relative positions of
// repositioned items.
// * The List Format (LVS_LIST)
// The control enforces a multi-column list of small-icon items with
// each item's caption to the right. No free rearranging is possible.
// * The Report Format (LVS_REPORT)
// The control enforces a single-column list of small-icon items with
// each item's caption to the right, and further columns used for item-
// specific sub-item text. The columns are capped with a SysHeader
// bar (unless specified) which allows the user to change the relative
// widths of each sub-item column.
//
// The icons and small-icons presented may be assigned as indices into
// an ImageList of the appropriate size. These ImageLists (either custom
// lists or copies of the system lists) are assigned to the control by the
// owner at initialization time or at any later time.
//
// Text and icon values may be "late-bound," or assigned by a callback
// routine as required by the control. For example, if it would be slow to
// compute the correct icon or caption for an item, the item can be assigned
// special values which indicate that they should be computed only as the
// items become visible (say, for a long list of items being scrolled into
// view).
//
// Each item has a state, which can be (nearly) any combination of the
// following attributes, mostly managed automatically by the control:
// * Selected (LVIS_SELECTED)
// The item appears selected. The appearance of selected items
// depends on whether the control has the focus, and the selection
// system colors.
// * Focused (LVIS_FOCUSED)
// One item at a time may be focused. The item is surrounded with a
// standard focus-rectangle.
// * Marked (LVIS_CUT)
// REVIEW: Call this "Checked"?
// * Disabled (LVIS_DISABLED)
// The item is drawn with the standard disabled style and coloring.
// * Drop-Highlighted (LVIS_DROPHILITED)
// The item appears marked when the user drags an object over it, if
// it can accept the object as a drop-target.
//
// There are notifications that allow applications to determine when an item
// has been clicked or double clicked, caption text changes have occured,
// drag tracking is occuring, widths of columns have changed, etc.
//
//////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -