📄 xtoutlookbar.h
字号:
// XTOutlookBar.h interface for the CXTContentItems class.
//////////////////////////////////////////////////////////////////////
#if !defined(__XTOUTLOOKBAR_H__)
#define __XTOUTLOOKBAR_H__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <afxtempl.h>
/////////////////////////////////////////////////////////////////////////////
// XT_CONTENT_ITEM
struct XT_CONTENT_ITEM
{
HICON m_hIcon; // Icon handle for menu item.
int m_nIndex; // Zero based index for menu item.
CString m_strText; // Text label for menu item.
};
/////////////////////////////////////////////////////////////////////////////
// CCXTOutlookBar is a CListBox derived class that implements a Outlook Bar
// style control, can only be used with the LBS_OWNERDRAWVARIABLE style bit set.
#define IDC_OUTBAR 112
class CXTOutlookBar : public CListBox
{
DECLARE_DYNAMIC(CXTOutlookBar)
public:
// -> Remarks: Constructs a CXTOutlookBar object.
CXTOutlookBar();
// -> Remarks: Destroys a CXTOutlookBar object, handles cleanup and de-allocation.
virtual ~CXTOutlookBar();
protected:
int m_cxIcon; // width of menu icon.
int m_cyIcon; // height of menu icon.
int m_nIndex; // currently selected menu index
bool m_bHilight; // true when menu item is selected
bool m_bLBDown; // true when left mouse button is pressed
CPoint m_point; // holds the cursor position
COLORREF m_clrBack; // backgound color
COLORREF m_clrText; // text color
CList<XT_CONTENT_ITEM*,XT_CONTENT_ITEM*> m_arContentItems;
public:
// -> Input: dwStyle - Specifies the window style attributes.
// rect - The size and position of the window, in client coordinates of
// pParentWnd.
// pParentWnd - The parent window.
// nID - The ID of the child window.
// -> Returns: Nonzero if successful; otherwise 0.
// -> Remarks: Creates an Outlook Bar control.
virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
// -> Input: clrText - COLORREF value for text
// clrBack - COLORREF value for the background
// -> Remarks: Call this member function to set the text and background colors for
// the outlook bar.
void SetColors(COLORREF clrText, COLORREF clrBack);
// -> Input: iIndex - Specifies the zero-based index of the position to insert the
// menu item. If this parameter is
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -