📄 controldefinitions.h
字号:
);
EXTERN_C
HRESULT
WINAPI
PHCreateLabeledEditDisplayItem(
__in const WCHAR* pLabelText,
DWORD EditStyle,
int EditTextLimit,
__deref_out IVoIPDisplayItem** ppItem,
int DefaultLabelWidth = -1, // -1 means auto-calculate based on label
UINT DefaultInputMode = (UINT)-1 // -1 means default to EIM_NUMBERS input mode
);
//
//Control Identifiers (used by resource dialog templates)
//
//these MUST be sequential
#define IDC_BUTTON1 100
#define IDC_BUTTON2 101
#define IDC_BUTTON3 102
#define IDC_BUTTON4 103
#define IDC_BUTTON5 104
#define IDC_MENUBAR 200
#define IDC_STATUSREGION 201
#define IDC_LISTBOX 202
//
//Custom WNDCLASS names
//
//WndClassName for dialog screen
#define WNDCLASS_DIALOGSCREEN TEXT("__VOIP_DIALOGSCREEN__")
//WndClassName for message box
#define WNDCLASS_MESSAGEBOX TEXT("__VOIP_MESSAGEBOX__")
//WndClass name for "transparent" text boxes - or text boxes which draw their parents background
#define WNDCLASS_TRANSPARENTTEXT TEXT("__VOIP_TRANSPARENTTEXT__")
//WndClass name for a custom listbox - Items in this listbox are ownerdrawn objects
#define WNDCLASS_LISTBOX TEXT("__VOIP_LISTBOX__")
//WndClassName for an edit - input mode aware
#define WNDCLASS_EDIT TEXT("__VOIP_EDIT__")
//WndClass name for a menu bar - a menu bar is needed to place/update buttons
#define WNDCLASS_MENUBAR TEXT("__VOIP_MENUBAR__")
//WndClass name for a menu button - a menu button is a context sensitive button
//identified by a MENUITEM or POPUP of the overall menuing structure.
#define WNDCLASS_MENUBUTTON TEXT("__VOIP_MENUBUTTON__")
//WndClassName for a popup menu
#define WNDCLASS_POPUPMENU TEXT("__VOIP_POPUPMENU__")
//WndClassName for a status header
#define WNDCLASS_STATUSHEADER TEXT("__VOIP_STATUSHEADER__")
//WndClassName for a tool tip
#define WNDCLASS_TOOLTIP TEXT("__VOIP_TOOLTIP__")
//WndClassName for a track bar
#define WNDCLASS_TRACKBAR TEXT("__VOIP_TRACKBAR__")
//
// Custom messages for our controls
// Last value used: (WM_USER + 25)
//
//====== COMMON CONTROL =======================================================
// Common notifications
#define VNM_SETFOCUS 0x1000
//Gets the callback pointer
//WPARAM: Ignored
//LPARAM: Ignored
//Returns INT_PTR that was stored on SetCallback
#define WM_COMMON_GETCALLBACK_PTR (WM_USER + 15)
//Sets the callback pointer
//WPARAM: Unused
//LPARAM: INT_PTR representing the callback value
//Returns: HRESULT
#define WM_COMMON_SETCALLBACK_PTR (WM_USER + 14)
//Purpose: Asks the control to calculate its dimensions
//WPARAM: NULL
//LPARAM: [OUT] SIZE* - pointer to a SIZE structure to be modified
//with the width and height of the control
//Returns: BOOL
#define WM_COMMON_CALCULATE_DIMENSIONS (WM_USER + 3)
//Purpose: Sets the input panel status
//WPARAM: BOOL indicates whether the input panel is visible or not
//LPARAM: NULL
//Returns: HRESULT
#define WM_COMMON_SET_INPUT_PANEL_STATUS (WM_USER + 22)
//Purpose: Asks for input panel status
//WPARAM: NULL
//LPARAM: NULL
//Returns: BOOL indicates whether the input panel should be visible or not
#define WM_COMMON_GET_INPUT_PANEL_STATUS (WM_USER + 23)
//====== EDIT CONTROL =========================================================
// Custom styles
#define VES_DIALPAD 0x8000 //Edit Style that means it only accepts dial pad chars (0-9,*,#)
//====== LISTBOX CONTROL ======================================================
// Custom notifications
#define VLBN_FIRST 0x2000
#define VLBN_ITEMS_ABOVE_DISPLAY 0x2001
#define VLBN_ITEMS_BELOW_DISPLAY 0x2002
//====== MENUBAR CONTROL ======================================================
//Purpose: Determines the number of mwnu buttons in the menubar
//WPARAM: NULL
//LPARAM: NULL
//Returns: int
#define WM_MENUBAR_GETMENUBUTTONCOUNT (WM_USER + 18)
//Purpose: Gets the HMENU associated with a menubar
//WPARAM: NULL
//LPARAM: NULL
//Returns: HMENU
#define WM_MENUBAR_GETMENUHANDLE (WM_USER + 16)
//Purpose: Associates an HMENU with a menubar
//WPARAM: resource ID
//LPARAM: NULL
//Returns: HRESULT
#define WM_MENUBAR_SETMENUHANDLE (WM_USER + 17)
//Purpose: Load from resources and associate an HMENU with a menubar
//WPARAM: resource ID
//LPARAM: [IN] HINSTANCE
//Returns: HRESULT
#define WM_MENUBAR_SETMENU (WM_USER + 1)
//Purpose: Update a menu item
//WPARAM: Menu item ID
//LPARAM: [IN] MENUITEMINFO* - pointer to a MENUITEMINFO structure
//Returns: HRESULT
#define WM_MENUBAR_SETMENUITEMINFO (WM_USER + 12)
//Purpose: Update a menu button
//WPARAM: Menu button index
//LPARAM: [IN] MENUITEMINFO* - pointer to a MENUITEMINFO structure
//Returns: HRESULT
#define WM_MENUBAR_SETMENUBUTTONINFO (WM_USER + 13)
//Purpose: Show/hide a menu button
//WPARAM: Menu button command Id
//LPARAM: BOOL indicates whether the button should be visible or not
//Returns: HRESULT
#define WM_MENUBAR_SHOWMENUBUTTON (WM_USER + 19)
//Purpose: Reset position of menu buttons
//WPARAM: NULL
//LPARAM: NULL
//Returns: Not used.
#define WM_MENUBAR_RESETPOSITIONS (WM_USER + 21)
//Purpose: Refresh the Input menu button
//WPARAM: active IME type
//LPARAM: NULL
//Returns: Not used.
#define WM_MENUBAR_REFRESHINPUTMENUBUTTON (WM_USER + 24)
//====== MENUBUTTON CONTROL ===================================================
//Purpose: Get Data of a button (text/popup/etc)
//WPARAM: size of data in bytes
//LPARAM: [OUT] pointer to the data
//Returns: BOOL
#define WM_MENUBUTTON_GETDATA (WM_USER + 11)
//Purpose: Set Data of a button (text/popup/etc)
//WPARAM: size of data in bytes
//LPARAM: pointer to the data
//Returns: BOOL
#define WM_MENUBUTTON_SETDATA (WM_USER + 2)
//Purpose: Show/hide a button
//WPARAM: BOOL indicates whether the button should be visible or not
//LPARAM: NULL
//Returns: HRESULT
#define WM_MENUBUTTON_SHOW (WM_USER + 20)
//====== POPUPMENU CONTROL ====================================================
// Custom styles
#define VPMS_INPUT 0x8000 //Popup menu style that means it is the Input menu
//Purpose: Sets a "flyout parent" (or previous popup menu) with this menu
//WPARAM: NULL
//LPARAM: [IN] HWND - of the flyout parent
//Returns: Not used.
#define WM_POPUPMENU_SETFLYOUTPARENT (WM_USER + 4)
//Purpose: Inserts an item into a popup menu
//WPARAM: NULL
//LPARAM: [IN] PopupMenuItem_t*
//Returns: BOOL
#define WM_POPUPMENU_INSERTITEM (WM_USER + 5)
//Purpose: Tell the menu to hide itself and its associated flyout menus
//WPARAM: NULL
//LPARAM: NULL
//Returns: BOOL
#define WM_POPUPMENU_HIDEMENUS (WM_USER + 6)
//Purpose: Tell the menu to show only a maximum number of items
//WPARAM: int - indicates the maximum number of items that should be visible
//LPARAM: NULL
//Returns: Not used.
#define WM_POPUPMENU_SETVISIBLEITEMS (WM_USER + 25)
//====== STATUSHEADER CONTROL =================================================
typedef enum _STATUS_HEADER_PRIORITY
{
shpError = 0, // Temporary error
shpTempChanges, // Insert/edit/delete item
shpNodeHelp, // Help for node items (not menu or Today)
shpSystem, // System status
shpHelp, // Help text for menu and Today
shpForwarding, // Call autoforward is on
shpIncomingCall, // Incoming call
shpMissedCalls, // xxx missed calls
shpDefault, // Default help string, if any
StatusHeaderPriorities, // Total number of priorities
} STATUS_HEADER_PRIORITY;
typedef struct _STATUS_HEADER_PARAMETERS
{
HINSTANCE Instance;
UINT ResourceId;
STATUS_HEADER_PRIORITY Priority;
DWORD Cookie;
DWORD secTimeout;
} STATUS_HEADER_PARAMETERS;
typedef struct _STATUS_HEADER_PARAMETERS_EX :
STATUS_HEADER_PARAMETERS
{
const WCHAR* pwszDisplayString;
} STATUS_HEADER_PARAMETERS_EX;
//Purpose: Adds a notification
//WPARAM: NULL
//LPARAM: [IN] STATUS_HEADER_PARAMETERS* - pointer to the info to be added
//returns HRESULT
#define WM_STATUSHEADER_ADDSTATUSNOTIFICATION (WM_USER + 7)
//Purpose: Removes a notification with the specified cookie
//WPARAM: [IN] DWORD - The cookie identifying the notification to remove
//LPARAM: NULL
//Returns: HRESULT
#define WM_STATUSHEADER_REMOVESTATUSNOTIFICATION (WM_USER + 8)
//Purpose: Gets the notification cookie of the active NotifyMessage
//WPARAM: NULL
//LPARAM: NULL
//Returns: DWORD cookie
#define WM_STATUSHEADER_GETSTATUSCOOKIE (WM_USER + 9)
//====== TOOLTIP CONTROL =================================================
//Purpose: Asks the tool tip to get its window metrics
//WPARAM: [IN] UINT - indicating the MAX width of the rect
//LPARAM: [OUT] SIZE* - pointer to a SIZE structure to be modified
//with the necessary height and width of the rect
#define WM_TOOLTIP_GETMETRICS (WM_USER + 10)
//====== TRANSPARENT TEXT CONTROL ========================================
// Custom styles
// The following styles map to the behavior of DrawText flags
#define VTS_TOP 0x00000000
#define VTS_LEFT 0x00000000
#define VTS_CENTER 0x00000001
#define VTS_RIGHT 0x00000002
#define VTS_VCENTER 0x00000004
#define VTS_BOTTOM 0x00000008
#define VTS_WORDBREAK 0x00000010
#define VTS_SINGLELINE 0x00000020
#define VTS_EXPANDTABS 0x00000040
#define VTS_NOPREFIX 0x00000800
#define VTS_END_ELLIPSIS 0x00008000
#endif // !defined __CONTROLDEFINITIONS_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -