|
// CJWindowPlacement.h : header file
// Copyright � 1998-1999 CodeJock.com, All Rights Reserved.
// See ReadMe.txt for TERMS OF USE.
//
/////////////////////////////////////////////////////////////////////////////
/****************************************************************************
*
* $Date: 10/26/99 10:49p $
* $Revision: 7 $
* $Archive: /CodeJock/Include/CJWindowPlacement.h $
*
* $History: CJWindowPlacement.h $
*
* ***************** Version 7 *****************
* User: Kirk Stowell Date: 10/26/99 Time: 10:49p
* Updated in $/CodeJock/Include
* Made class methods virtual for inheritance purposes.
*
* ***************** Version 6 *****************
* User: Kirk Stowell Date: 8/31/99 Time: 1:11a
* Updated in $/CodeJockey/Include
* Updated copyright and contact information.
*
* ***************** Version 5 *****************
* User: Kirk Stowell Date: 7/25/99 Time: 12:42a
* Updated in $/CodeJockey/Include
*
* ***************** Version 4 *****************
* User: Kirk Stowell Date: 7/18/99 Time: 10:09p
* Updated in $/CodeJockey/Include
* Cleaned up inline functions, and import/export macro so that class will
* be imported when linked to, and exported at compile time.
*
* ***************** Version 3 *****************
* User: Kirk Stowell Date: 6/11/99 Time: 10:15p
* Updated in $/CodeJockey/Include
* Modified LoadWindowPos(...) to allow registry names to be directly
* passed in.
*
* ***************** Version 2 *****************
* User: Kirk Stowell Date: 6/11/99 Time: 9:41p
* Updated in $/CodeJockey/Include
* Initial creation.
*
* ***************** Version 1 *****************
* User: Kirk Stowell Date: 6/01/99 Time: 9:30p
* Created in $/CodeJockey/Include
*
***************************************************************************/
/////////////////////////////////////////////////////////////////////////////
#ifndef __CJWINDOWPLACEMENT_H__
#define __CJWINDOWPLACEMENT_H__
// CCJWindowPlacement is a WINDOWPLACEMENT derived class which is used to
// save and restore your applications window position.
class _CJX_EXT_CLASS CCJWindowPlacement : public WINDOWPLACEMENT
{
public:
// Default constructor
//
CCJWindowPlacement();
// Virtual destructor
//
virtual ~CCJWindowPlacement();
private:
CString m_strFormat; // format string for registry settings.
CString m_strSection; // registry section name.
CString m_strWndPos; // registry entry name.
public:
// call this member function to load your applications previously saved
// window position. To use, add a member variable to your CWinApp derived
// class ie: CCJWindowPlacement m_wndPlacement; then replace the call
// to pMainFrame->ShowWindow(...) with m_wndPlacement.LoadWindowPos( pMainFrame );
//
virtual BOOL LoadWindowPos( CFrameWnd* pFrameWnd, LPCTSTR lpszFormat=NULL, LPCTSTR lpszSection=NULL, LPCTSTR lpszWndPos=NULL );
// call this member function to save your applications window position. To
// use, add the ON_WM_CLOSE message handler to your CFrameWnd derived class,
// then make a call to theApp.m_wndPlacement.SaveWindowPos( this ); just before
// you call the base class OnClose().
//
virtual void SaveWindowPos( CFrameWnd* pFrameWnd );
};
/////////////////////////////////////////////////////////////////////////////
#endif // __CJWINDOWPLACEMENT_H__
|
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.
I haven't always written software for a living. When I graduated from Surrey University in 1989, it was with an Electronic Engineering degree, but unfortunately that never really gave me the opportunity to do anything particularly interesting (with the possible exception of designing
Darth Vader's Codpiece * for the UK Army in 1990).
* Also known as the Standard Army Bootswitch. But that's another story...
Since the opportunity arose to lead a software team developing C++ software for
Avionic Test Systems in 1996, I've not looked back. More recently I've been involved in the development of subsea acoustic navigation systems, digital TV broadcast systems, port security/tracking systems, and most recently software development tools with my own company,
Riverblade Ltd.
One of my personal specialities is IDE plug-in development.
ResOrg was my first attempt at a plug-in, but my day to day work is with
Visual Lint, an interactive code analysis tool environment with works within the Visual Studio and Eclipse IDEs or on build servers.
I love lots of things, but particularly music, photography and anything connected with history or engineering. I
despise ignorant, intolerant and obstructive people - and it shows...I can be a bolshy cow if you wind me up the wrong way...
I'm currently based 15 minutes walk from the beach in Bournemouth on the south coast of England. Since I moved here I've grown to love the place - even if it is full of grockles in Summer!