STATBAR.H
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:3k
源码类别:
Windows编程
开发平台:
Visual C++
- // statbar.h : definition of old backward compatible CStatusBar
- //
- // This is a part of the Microsoft Foundation Classes C++ library.
- // Copyright (C) 1992-1998 Microsoft Corporation
- // All rights reserved.
- //
- // This source code is only intended as a supplement to the
- // Microsoft Foundation Classes Reference and related
- // electronic documentation provided with the library.
- // See these sources for detailed information regarding the
- // Microsoft Foundation Classes product.
- #ifndef _STATBAR_H_
- #define _STATBAR_H_
- struct AFX_STATUSPANE; // private to implementation
- class COldStatusBar : public CControlBar
- {
- DECLARE_DYNAMIC(COldStatusBar)
- // Construction
- public:
- COldStatusBar();
- BOOL Create(CWnd* pParentWnd,
- DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,
- UINT nID = AFX_IDW_STATUS_BAR);
- BOOL SetIndicators(const UINT* lpIDArray, int nIDCount);
- // Attributes
- public: // standard control bar things
- int CommandToIndex(UINT nIDFind) const;
- UINT GetItemID(int nIndex) const;
- void GetItemRect(int nIndex, LPRECT lpRect) const;
- public:
- void GetPaneText(int nIndex, CString& s) const;
- BOOL SetPaneText(int nIndex, LPCTSTR lpszNewText, BOOL bUpdate = TRUE);
- void GetPaneInfo(int nIndex, UINT& nID, UINT& nStyle, int& cxWidth) const;
- void SetPaneInfo(int nIndex, UINT nID, UINT nStyle, int cxWidth);
- UINT GetPaneStyle(int nIndex) const;
- void SetPaneStyle(int nIndex, UINT nStyle);
- // Implementation
- public:
- virtual ~COldStatusBar();
- virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- void EnableDocking(DWORD dwDockStyle);
- #endif
- protected:
- HFONT m_hFont;
- int m_cxSizeBox; // for Win4 style size box in corner
- BOOL m_bHideSizeBox; // hide size box if TRUE
- inline AFX_STATUSPANE* _GetPanePtr(int nIndex) const;
- void DrawStatusText(CDC* pDC, const CRect& rect,
- LPCTSTR lpszText, UINT nStyle);
- virtual void DoPaint(CDC* pDC);
- virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
- //{{AFX_MSG(COldStatusBar)
- afx_msg UINT OnNcHitTest(CPoint point);
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnGetFont(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnGetText(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnGetTextLength(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnSizeParent(WPARAM wParam, LPARAM lParam);
- afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- // define CStatusBar to COldStatusBar for convenience
- #define CStatusBar COldStatusBar
- #endif //!_STATBAR_H_