📄 tabbarwnd.h
字号:
#if !defined(AFX_TABSWINDOW_H__6A06C13B_4748_11D1_BC91_0000010016A6__INCLUDED_)
#define AFX_TABSWINDOW_H__6A06C13B_4748_11D1_BC91_0000010016A6__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// TabBarsWnd.h : header file
//
#include "Common\TabCtrlEx.h"
/////////////////////////////////////////////////////////////////////////////
// CTabBarsWnd window
#define TABBAR_WINDOW_TIMERID 0x201
class CCommands;
class BCMenu;
class CTabBarsWnd : public CWnd
{
friend class CTabManagerWindow;
// Construction
public:
CTabBarsWnd(CCommands* pCommands);
// Attributes
public:
CTabCtrlEx m_TabCtrl;
int m_iLockUpdates;
IApplication * m_pApplication;
CCommands * m_pCommands;
int m_iMinHeight;
int m_iMinWidth;
UINT m_uTimerID;
// Operations
public:
void UpdateTabs();
// void Reorder();
// void Renumber();
bool GetDocumentObject(CComQIPtr<IGenericWindow, &IID_IGenericWindow> pWindow,
CComQIPtr<IGenericDocument, &IID_IGenericDocument>& pDoc);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTabBarsWnd)
public:
virtual BOOL DestroyWindow();
//}}AFX_VIRTUAL
// Implementation
public:
void SetTabFont(CFont *pFont);
void ActivateTab(int iIndex);
virtual ~CTabBarsWnd();
// Generated message map functions
protected:
BOOL LoadPopupMenu(int nResourceID, BCMenu& pMenu, BCMenu *& pPopup);
bool FindDSWindow(int iSel, CComQIPtr<IGenericWindow, &IID_IGenericWindow>& pWindow);
//Fis the bug on "close all except this" menu item
void ActivateWindow(CComQIPtr<IGenericWindow, &IID_IGenericWindow>& pWindow, BOOL bActive = TRUE);
//close a window by IGenericWindow object
void CloseDSWindow(CComQIPtr<IGenericWindow, &IID_IGenericWindow>& pWindow);
//{{AFX_MSG(CTabBarsWnd)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
afx_msg void OnDestroy();
afx_msg void OnPaint();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
afx_msg void OnSelchangeTabCtrl(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnToolTipTabCtrl (NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRClickTabCtrl (NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
afx_msg void OnDbClickTabCtrl(int nTabIdx,LPARAM lParam);
DECLARE_MESSAGE_MAP();
CFont *m_pFont;
CImageList m_TabImages;
CRect m_RectGripper;
struct tabdata_t
{
HWND hWnd; // corresponding window
CString cPath; // window title (file path)
// int iNumber; // displayed tab number
int iIndex; // index in tab control
BOOL bVerified; // for internal list keeping
};
tabdata_t * GetTabData(int iTabIndex);
CTypedPtrMap<CMapPtrToPtr, HWND, tabdata_t *> m_TabData;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABSWINDOW_H__6A06C13B_4748_11D1_BC91_0000010016A6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -