subwndcontainer.h
来自「基于WINDOWS mobile 的用于创建一个窗体和自定义试图的工程」· C头文件 代码 · 共 80 行
H
80 行
#if !defined(AFX_SUBWNDCONTAINER_H__6043F7F7_31E5_451F_8BDC_BBBFDA2777CC__INCLUDED_)
#define AFX_SUBWNDCONTAINER_H__6043F7F7_31E5_451F_8BDC_BBBFDA2777CC__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// SubWndContainer.h : header file
//
#include <vector>
#include "SubWnd.h"
typedef std::vector<CSubWnd*> CSubWndCont;
#define WC_SUBWNDCONT _T("SubWndCont") // Window class name
//---------------------------------------------------------------------------
//
// CSubWndContainer window
//
//---------------------------------------------------------------------------
class CSubWndContainer : public CWnd
{
// Construction
public:
CSubWndContainer();
// Attributes
public:
// Operations
public:
void Add(CSubWnd* pSubWnd);
BOOL Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID);
/// Retrieves a sub window from a point.
CSubWnd* SubWndFromPoint(CPoint point);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSubWndContainer)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSubWndContainer();
protected:
CSubWndCont m_cont; ///< Container for sub windows.
CSubWnd* m_pSubWnd; ///< Active sub window
HFONT m_hFont;
BOOL RegisterWindowClass();
// Generated message map functions
//{{AFX_MSG(CSubWndContainer)
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
//---------------------------------------------------------------------------
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SUBWNDCONTAINER_H__6043F7F7_31E5_451F_8BDC_BBBFDA2777CC__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?