|
// GenDockablePane.h header file for CGenDockablePane
//
// Copyright (c) 2011 by Andrew W. Phillips.
//
// This file is distributed under the MIT license, which basically says
// you can do what you want with it but I take no responsibility for bugs.
// See http://www.opensource.org/licenses/mit-license.php for full details.
//
#pragma once
#include "Resource.h"
class CGenDockablePane : public CDockablePane
{
DECLARE_DYNAMIC(CGenDockablePane)
public:
CGenDockablePane();
virtual ~CGenDockablePane();
CWnd *m_pNestedWnd; // the window nested within (typically a dialog)
// Overrides
// This stops buttons being disabled because they have no command handler
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) { }
void InitialUpdate(CWnd *pWnd);
void ShowAndUnroll();
void Float(bool bShow = true);
void Hide() { ShowPane(FALSE, FALSE, FALSE); }
void Toggle() { if (IsWindowVisible()) Hide(); else ShowAndUnroll(); }
// Pane is floating in its own window (buy may not be visible)
bool IsFloating() { return !IsDocked() && !IsTabbed(); }
CSize GetDefaultSize();
CSize GetFrameSize();
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSetFocus(CWnd* pOldWnd);
DECLARE_MESSAGE_MAP()
private:
void AdjustLayout();
};
|
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.
Andrew has a BSc (1983) from Sydney University in Computer Science and Mathematics. Andrew began programming professionally in C in 1984 and has since used many languages but mainly C, C++, and C#.
Andrew has a particular interest in STL, .Net, and Agile Development. He has written articles on STL for technical journals such as the C/C++ User's Journal.
In 1997 Andrew began using MFC and released the source code for a Windows binary file editor called HexEdit, which was downloaded more than 1 million times. From 2001 there was a shareware version of HexEdit (later called HexEdit Pro). HexEdit has been updated to uses the new MFC (based on BCG) and is once more open source.