📄 sizeiconctrl.h
字号:
#if !defined(AFX_CSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_)
#define AFX_CSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// CSizeIconCtrl.h : header file
//
//
// CSizeIconCtrl.h : header file
// -----------------------------------------------------------------------
// Author: Hans B黨ler (hb@codex-design.de)
// codex design (http://www.codex-design.de)
// Version: 1.3
// -----------------------------------------------------------------------
// Changes for 1.1:
// - CSizeIconCtrl catches left-mb-doubleclick what caused the window
// to get maximized for any reason.
// Changes for 1.2:
// - Ability to check parent's state: If it is zoomed, the control won't
// draw a sizing icon.
// Changes for 1.3:
// - Icon now has proper colors.
// -----------------------------------------------------------------------
// Comments welcome.
//
/*
* CSizeIconCtrl
* ================
* A simple class that is a size-icon.
*
* (w)Nov.1998 mailto:hans.buehler@student.hu-berlin.de,
* codex design
*/
class AFX_EXT_CLASS CSizeIconCtrl : public CScrollBar
{
DECLARE_DYNAMIC(CSizeIconCtrl);
public:
class AFX_EXT_CLASS AutoOEMImageList : public CImageList
{
private:
CSize m_szImage;
public:
AutoOEMImageList(UINT nBitmapID, COLORREF crMask);
virtual ~AutoOEMImageList() {}
const CSize & Size() const { return m_szImage; }
};
private:
bool m_bCapture;
public:
bool m_bReflectParentState;
public:
CSizeIconCtrl(bool bReflectParentState = true) : m_bCapture(false), m_bReflectParentState(bReflectParentState) {}
virtual ~CSizeIconCtrl() {}
virtual BOOL Create(CWnd *pParent, UINT id = AFX_IDW_SIZE_BOX);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSizeIconCtrl)
//}}AFX_VIRTUAL
// Generated message map functions
protected:
//{{AFX_MSG(CSizeIconCtrl)
afx_msg void OnPaint();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP();
//
// static members
//
public:
static AutoOEMImageList M_ilImage;
static HCURSOR M_hcSize;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -