Annotation of mstools/mfc/samples/multipad/bar.h, revision 1.1

1.1     ! root        1: // bar.h : Defines the interfaces to the status-bar window classes.
        !             2: //
        !             3: // This is a part of the Microsoft Foundation Classes C++ library.
        !             4: // Copyright (C) 1992 Microsoft Corporation
        !             5: // All rights reserved.
        !             6: //
        !             7: // This source code is only intended as a supplement to the
        !             8: // Microsoft Foundation Classes Reference and Microsoft
        !             9: // QuickHelp documentation provided with the library.
        !            10: // See these sources for detailed information regarding the
        !            11: // Microsoft Foundation Classes product.
        !            12: 
        !            13: #ifndef __BAR_H__
        !            14: #define __BAR_H__
        !            15: 
        !            16: /////////////////////////////////////////////////////////////////////////////
        !            17: 
        !            18: // CBarWnd
        !            19: // A CBarWnd is a window which has the typical Windows three-dimensional
        !            20: // "chiseled" look to it, and can be used (by deriving new classes from it)
        !            21: // to create status bars, toolbars, etc.
        !            22: 
        !            23: class CBarWnd : public CWnd
        !            24: {
        !            25: private:
        !            26:        static HCURSOR m_hCursor;
        !            27:        static CString m_szRegistration;
        !            28: 
        !            29: public:
        !            30:        BOOL Create(CWnd* pParentWnd, CRect rect);
        !            31:        
        !            32:        afx_msg void OnNcPaint();
        !            33:        afx_msg void OnNcCalcSize(NCCALCSIZE_PARAMS FAR* lpcsps);
        !            34:        
        !            35:        DECLARE_MESSAGE_MAP()
        !            36: };
        !            37: 
        !            38: // CStatBar
        !            39: // A CStatBar is a CBarWnd which acts as a status bar.  It is very similar
        !            40: // in operation to a plain static text label in dialogs, but it has the
        !            41: // chiseled look of a CBarWnd.  Typically, it is put along the bottom of a
        !            42: // frame window and the text set according to the status of the application.
        !            43: //
        !            44: // To set the text, use the SetText member function.  New text is drawn 
        !            45: // when the window is next painted.
        !            46: 
        !            47: class CStatBar : public CBarWnd
        !            48: {
        !            49: private:
        !            50:        CString m_string;
        !            51:        CFont m_font;
        !            52:        
        !            53: public:
        !            54:        BOOL Create(CWnd* pParentWnd, CRect rect);
        !            55:        
        !            56:        afx_msg void OnPaint();
        !            57: 
        !            58:        void SetText(char* sz)
        !            59:                { m_string = sz; Invalidate(FALSE); }
        !            60:        
        !            61:        DECLARE_MESSAGE_MAP()
        !            62: };
        !            63: 
        !            64: /////////////////////////////////////////////////////////////////////////////
        !            65: 
        !            66: #endif // __BAR_H__
        !            67: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.