Click here to Skip to main content
15,886,137 members
Articles / Desktop Programming / MFC

Exile 1.8 - The Password Manager

Rate me:
Please Sign up or sign in to vote.
4.57/5 (51 votes)
6 Mar 20058 min read 255.3K   7.4K   111  
Yet another password manager.
#if !defined(AFX_PROPERTYBROWSER_H__37716D5C_9ED0_422B_947B_9DBEB9DB87F5__INCLUDED_)
#define AFX_PROPERTYBROWSER_H__37716D5C_9ED0_422B_947B_9DBEB9DB87F5__INCLUDED_

#include "PropertyGrid.h"	// Added by ClassView
#include "DescriptionFrame.h"	// Added by ClassView
#include "resource.h"
#include "notifications.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PropertyBrowser.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CPropertyBrowser dialog

const UINT CONTROLS_SPACING = 3; // Between description and pgrid

class CPropertyBrowser : public CDialog, public IPropertyGridNotification
{
// Construction
public:
	void LayoutBrowser(int nBrowserHeight);
	void LayoutBrowser(double dBrowserHeight);
	void PostCreate();
	CPropertyBrowser(CWnd* pParent = NULL);   // standard constructor
	~CPropertyBrowser();

	CPropertyGrid& GetPropertyGrid() { return m_ctrlPropertyGrid; }

	//
	// IPropertyGridNotification methods
	//
	virtual BOOL Ready();
	virtual BOOL SupportsSynchronousNotifications();
	virtual BOOL SupportsAsynchronousNotifications();
	virtual BOOL CategorySelected(LPCTSTR pszCategoryName, LPCTSTR pszCategoryDescription);
	virtual BOOL ElementSelected(LPCTSTR pszElementName, LPCTSTR pszElementDescription);

// Dialog Data
	//{{AFX_DATA(CPropertyBrowser)
	enum { IDD = IDD_PROPERTYBROWSER_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPropertyBrowser)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CPropertyBrowser)
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);	
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	BOOL Between(int nValue, int nSample, int nDelta) { return ((nValue >= nSample - nDelta) && (nValue <= nSample + nDelta)); }

	void LayoutControls();
	CPropertyGrid m_ctrlPropertyGrid;
	CDescriptionFrame m_ctrlDescription;
	CRect m_rcClient;
	int m_nBrowserHeight;
	int m_nDescriptionHeight;
	double m_dRatio;
	HCURSOR m_hSize, m_hNormal;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PROPERTYBROWSER_H__37716D5C_9ED0_422B_947B_9DBEB9DB87F5__INCLUDED_)

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
Web Developer
Russian Federation Russian Federation
I'll think about it later on...

Comments and Discussions