| 1 |
///////////////////////////////////////////////////////////////////////// |
| 2 |
// |
| 3 |
// CSizingControlBarG Version 2.44 |
| 4 |
// |
| 5 |
// Created: Jan 24, 1998 Last Modified: March 31, 2002 |
| 6 |
// |
| 7 |
// See the official site at www.datamekanix.com for documentation and |
| 8 |
// the latest news. |
| 9 |
// |
| 10 |
///////////////////////////////////////////////////////////////////////// |
| 11 |
// Copyright (C) 1998-2002 by Cristi Posea. All rights reserved. |
| 12 |
// |
| 13 |
// This code is free for personal and commercial use, providing this |
| 14 |
// notice remains intact in the source files and all eventual changes are |
| 15 |
// clearly marked with comments. |
| 16 |
// |
| 17 |
// You must obtain the author's consent before you can include this code |
| 18 |
// in a software library. |
| 19 |
// |
| 20 |
// No warrantee of any kind, express or implied, is included with this |
| 21 |
// software; use at your own risk, responsibility for damages (if any) to |
| 22 |
// anyone resulting from the use of this software rests entirely with the |
| 23 |
// user. |
| 24 |
// |
| 25 |
// Send bug reports, bug fixes, enhancements, requests, flames, etc. to |
| 26 |
// cristi@datamekanix.com or post them at the message board at the site. |
| 27 |
///////////////////////////////////////////////////////////////////////// |
| 28 |
|
| 29 |
#if !defined(__SCBARG_H__) |
| 30 |
#define __SCBARG_H__ |
| 31 |
|
| 32 |
#if _MSC_VER >= 1000 |
| 33 |
#pragma once |
| 34 |
#endif // _MSC_VER >= 1000 |
| 35 |
|
| 36 |
///////////////////////////////////////////////////////////////////////// |
| 37 |
// CSCBButton (button info) helper class |
| 38 |
|
| 39 |
class CSCBButton |
| 40 |
{ |
| 41 |
public: |
| 42 |
CSCBButton(); |
| 43 |
|
| 44 |
void Move( CPoint ptTo ) |
| 45 |
{ |
| 46 |
ptOrg = ptTo; |
| 47 |
}; |
| 48 |
CRect GetRect() |
| 49 |
{ |
| 50 |
return CRect( ptOrg, CSize( 11, 11 ) ); |
| 51 |
}; |
| 52 |
void Paint( CDC* pDC ); |
| 53 |
|
| 54 |
BOOL bPushed; |
| 55 |
BOOL bRaised; |
| 56 |
|
| 57 |
protected: |
| 58 |
CPoint ptOrg; |
| 59 |
}; |
| 60 |
|
| 61 |
///////////////////////////////////////////////////////////////////////// |
| 62 |
// CSizingControlBar control bar |
| 63 |
|
| 64 |
#ifndef baseCSizingControlBarG |
| 65 |
#define baseCSizingControlBarG CSizingControlBar |
| 66 |
#endif |
| 67 |
|
| 68 |
class CSizingControlBarG : public baseCSizingControlBarG |
| 69 |
{ |
| 70 |
DECLARE_DYNAMIC( CSizingControlBarG ); |
| 71 |
|
| 72 |
// Construction |
| 73 |
public: |
| 74 |
CSizingControlBarG(); |
| 75 |
|
| 76 |
// Attributes |
| 77 |
public: |
| 78 |
virtual BOOL HasGripper() const; |
| 79 |
|
| 80 |
// Operations |
| 81 |
public: |
| 82 |
|
| 83 |
// Overridables |
| 84 |
virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler ); |
| 85 |
|
| 86 |
// Overrides |
| 87 |
public: |
| 88 |
// ClassWizard generated virtual function overrides |
| 89 |
//{{AFX_VIRTUAL(CSizingControlBarG) |
| 90 |
//}}AFX_VIRTUAL |
| 91 |
|
| 92 |
// Implementation |
| 93 |
public: |
| 94 |
virtual ~CSizingControlBarG(); |
| 95 |
|
| 96 |
protected: |
| 97 |
// implementation helpers |
| 98 |
virtual void NcPaintGripper( CDC* pDC, CRect rcClient ); |
| 99 |
virtual void NcCalcClient( LPRECT pRc, UINT nDockBarID ); |
| 100 |
|
| 101 |
protected: |
| 102 |
int m_cyGripper; |
| 103 |
|
| 104 |
CSCBButton m_biHide; |
| 105 |
|
| 106 |
// Generated message map functions |
| 107 |
protected: |
| 108 |
//{{AFX_MSG(CSizingControlBarG) |
| 109 |
afx_msg UINT OnNcHitTest( CPoint point ); |
| 110 |
afx_msg void OnNcLButtonUp( UINT nHitTest, CPoint point ); |
| 111 |
//}}AFX_MSG |
| 112 |
|
| 113 |
DECLARE_MESSAGE_MAP() |
| 114 |
}; |
| 115 |
|
| 116 |
#endif // !defined(__SCBARG_H__) |
| 117 |
|