Click here to Skip to main content
15,897,371 members
Articles / Desktop Programming / MFC

SolidGraph CAD System

Rate me:
Please Sign up or sign in to vote.
4.97/5 (78 votes)
12 Sep 20062 min read 376.2K   29.8K   209  
A SolidGraph CAD system source code.
#pragma once
#include "afxext.h"

class CEGPaneBar :
	public CControlBar
{
	HWND m_hPane;

	int m_iSize;
	BOOL m_bDragging;
	CRect m_dragRect;

	HCURSOR m_curHorzDrag;
	HCURSOR m_curVertDrag;
	
	TCHAR* m_pszCaption;
	HFONT m_fntCaption;

	HFONT m_fntXButton;
	BOOL m_bClosePressed;
	BOOL m_bCloseHover;

	BOOL IsVertical();
	void SetDragCursor();
    BOOL m_bActive;

	CRect GetCaptionRect();
	CRect GetCloseButtonRect();

	void InvalidateCaption();
	void OnInvertTracker(const CRect& rect);

public:
	CEGPaneBar(void);
	~CEGPaneBar(void);

	void SetPane( HWND hPane );
	BOOL Create(TCHAR* pszCaption, CWnd * pParent, int nSize, int iId);
	void SetAlign( DWORD dwSide );
	void SetCaption( TCHAR* pszCaption );

	void HidePane();
	void ShowPane();
	void ToggleVisible();

		
	// Perform the UI idle updating for the check/radio/select subitems
	virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
	virtual CSize CalcFixedLayout ( BOOL bStretch, BOOL bHorz );
	
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnSetFocus( CWnd* pOldWnd );
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions