Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Exile 1.8 - The Password Manager

, 6 Mar 2005
Yet another password manager.
exile_18_setup.zip
exile_1.8_setup.exe
exile_exe.zip
exile.exe
Exile.exe.manifest
icons.dll
md5.dll
mdx.dll
PwsInfo.dll
rc5.dll
exile_exe_staticmfc.zip
exile.exe
icons.dll
md5.dll
mdx.dll
rc5.dll
exile_src.zip
exile
Exile
Exile.exe.manifest
exile.dep
exile.dsp
exile.dsw
res
aboveimportant.ico
advanced.bmp
belowcritical.ico
belowinsignificant.ico
belownormal.ico
changeicon.bmp
cold.ico
collapsed.ico
critical.ico
editcategory.bmp
editelement.bmp
enterpassword.bmp
error.ico
exile.ico
expanded.ico
exporttoxml.bmp
find.ico
found.ico
important.ico
insertcategory.bmp
insertelement.bmp
insignificant.ico
md5hashgenerator.bmp
new.bmp
normal.ico
options.bmp
passwordgenerator.bmp
rsasecurity.bmp
rsasecurity.ico
search.cur
storageproperties.bmp
switch.bmp
unimportant.ico
veryimportant.ico
vssver.scc
Icons
res
icon1.ico
icon10.ico
icon11.ico
icon12.ico
icon13.ico
icon14.ico
icon15.ico
icon16.ico
icon17.ico
icon18.ico
icon19.ico
icon2.ico
icon20.ico
icon21.ico
icon22.ico
icon23.ico
icon24.ico
icon25.ico
icon26.ico
icon27.ico
icon28.ico
icon3.ico
icon4.ico
icon5.ico
icon6.ico
icon7.ico
icon8.ico
icon9.ico
md5
md5.dep
md5.dsp
mdx
pwsinfo
passwordstorageshellext.rgs
pwsinfo.def
pwsinfo.dep
pwsinfo.dsp
pwsinfo.dsw
PwsInfo.tlb
pwsinfops.def
pwsinfops.mk
rc5
rc5.dep
rc5.dsp
xml
exile_src_vs2003.zip
Exile.exe.manifest
Exile.dep
Exile.dsp
Exile.dsw
Exile.suo
msxml3.tlh
msxml3.tli
res
AboveImportant.ico
Advanced.bmp
BelowCritical.ico
BelowInsignificant.ico
BelowNormal.ico
ChangeIcon.bmp
Cold.ico
Critical.ico
EditCategory.bmp
EditElement.bmp
EnterPassword.bmp
Error.ico
Exile.ico
ExportToXML.bmp
Find.ico
Found.ico
Icon1.ico
Icon10.ico
Icon11.ico
Icon12.ico
Icon13.ico
Icon14.ico
icon15.ico
Icon16.ico
Icon17.ico
Icon18.ico
Icon19.ico
Icon2.ico
Icon20.ico
Icon21.ico
Icon22.ico
Icon23.ico
Icon24.ico
Icon25.ico
Icon26.ico
Icon27.ico
Icon28.ico
Icon3.ico
Icon4.ico
Icon5.ico
Icon6.ico
Icon7.ico
Icon8.ico
Icon9.ico
Important.ico
InsertCategory.bmp
InsertElement.bmp
Insignificant.ico
MD5HashGenerator.bmp
New.bmp
Normal.ico
Options.bmp
PasswordGenerator.bmp
RSASecurity.bmp
rsasecurity.ico
Search.cur
StorageProperties.bmp
Switch.bmp
Unimportant.ico
VeryImportant.ico
vssver.scc
MD5
MD5.dep
MD5.dsp
PwsInfo
PasswordStorageShellExt.rgs
PwsInfo.def
PwsInfo.dep
PwsInfo.dsp
PwsInfo.dsw
PwsInfo.tlb
PwsInfops.def
PwsInfops.mk
RC5
RC5.dep
RC5.dsp
/********************************************************************
	Created:	27/3/2004, 14:36
	File name: 	D:\Projects\Exile\Exile\ExileDlg.h
	File path:	D:\Projects\Exile\Exile
	File base:	ExileDlg
	File ext:	h
	Author:		Gogolev Anton
*********************************************************************/

// ExileDlg.h : header file
//

#if !defined(AFX_EXILEDLG_H__4CCF6630_637C_419F_9F46_7AE19F62C70B__INCLUDED_)
#define AFX_EXILEDLG_H__4CCF6630_637C_419F_9F46_7AE19F62C70B__INCLUDED_

#include "typedefs.h"	// Added by ClassView
#include "GroupedControls.h"	// Added by ClassView
#include "../RC5/RC5.h"
#include "StaticEx.h"	// Added by ClassView
#include "StaticHyperlinkEx.h"	// Added by ClassView
#include "ReadonlyEdit.h"
#include "TreeCtrlEx.h"
#include "predefined.h"	// Added by ClassView
#include "hyperlink.h"
#import <msxml3.dll>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CExileDlg dialog

class CExileDlg : public CDialog
{
// Construction
public:	
	CExileDlg(CWnd* pParent = NULL);	// standard constructor	

	// Dialog Data
	//{{AFX_DATA(CExileDlg)
	enum { IDD = IDD_EXILE_DIALOG };
	CStatic	m_ctrlRatingIcon;
	CTreeCtrlEx	m_ctrlTree;
	CHyperlink		m_ctrlAddress;
	CReadonlyEdit	m_ctrlPassword;
	CReadonlyEdit	m_ctrlNotes;
	CReadonlyEdit	m_ctrlLogin;
	CStatic	m_ctrlModeSwitch;
	CStatic	m_ctrlItemIcon;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CExileDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CExileDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnFileNew();
	afx_msg void OnFileOpen();
	afx_msg void OnFileClose();
	afx_msg void OnFileSave();
	afx_msg void OnFileSaveas();
	afx_msg void OnDestroy();
	afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnEditInsertcategory();
	afx_msg void OnEditInsertelement();
	afx_msg void OnAppAbout();
	afx_msg void OnClose();
	afx_msg void OnToolsMd5hashgenerator();
	afx_msg void OnToolsPasswordgenerator();
	afx_msg void OnPasswordTitle();
	afx_msg void OnEditDelete();
	afx_msg void OnEditEdit();
	afx_msg void OnEditStorageproperties();	
	afx_msg void OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnTraymenuRestore();
	afx_msg void OnTraymenuEnablehotkeys();
	afx_msg void OnEditOptions();
	afx_msg void OnCategorycontextSortNameascending();
	afx_msg void OnCategorycontextSortNamedescending();
	afx_msg void OnCategorycontextSortUsernameascending();
	afx_msg void OnCategorycontextSortUsernamedescending();
	afx_msg void OnCategorycontextSortRatingascending();
	afx_msg void OnCategorycontextSortRatingdescending();
	afx_msg void OnFileExportExporttoxml();
	afx_msg void OnEditAdvanced();	
	//}}AFX_MSG
	afx_msg LRESULT OnActivateApp(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnTcexItemdragged(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnShleRButtondown(WPARAM wParam, LPARAM lParam);
	afx_msg void OnCopy();
	DECLARE_MESSAGE_MAP()
private:
	void PerformAutoCleanClipboard();
	void AutoCleanClipboard();
	BOOL m_bClipboardErasing; // Automatic Clipboard Erasing
	int m_nErasingTimeout; // Clipboard Erasing Timeout (seconds)
	CString m_strLastStorage;
	LONG XmlReadLong(MSXML2::IXMLDOMNodePtr pNode, LPCTSTR pszAttribute, LONG lDefault = 0);
	BOOL XmlReadBool(MSXML2::IXMLDOMNodePtr pNode, LPCTSTR pszAttribute, BOOL bDefault = TRUE);
	CString XmlReadString(MSXML2::IXMLDOMNodePtr pNode, LPCTSTR pszAttribute, CString strDefault = _T(""));
	void LoadSettings();
	BOOL m_bShellOpenReadonly; // Shell Open As Read Only
	BOOL m_bReloadReadonly; // Reload as Read Only
	void CopyToClipboard(CString& rString);
	void SaveSettings();
	BOOL m_bReadOnly;
	void MaintainFileAssociations();
	BOOL m_bMaintain;
	BOOL m_bBackup;
	// SmartType Hot Key Code
	WORD m_wKeyCode;
	// SmartType Hot Key Modifiers (MFC thing)
	WORD m_wModifiers;
	BOOL m_bSmartType;
	void EditElementAdvanced(HTREEITEM hItem);
	void LoadStorageXml();
	void LoadStorageSerial();
	void SaveStorageSerial();
	MSXML2::IXMLDOMElementPtr ExportTreeXml(MSXML2::IXMLDOMDocument2Ptr pXMLDoc, MSXML2::IXMLDOMElementPtr pXMLElement, HTREEITEM hRoot, 
		int nIndent, unsigned int nExportFlags);
	void ExportXml(CString strFileName, unsigned int nExportFlags); // flags from xmlexportflags.h
	int m_nSelection;
	CString Indent(int nIndent);
	MSXML2::IXMLDOMElementPtr SaveTreeXml(MSXML2::IXMLDOMDocument2Ptr pXMLDoc, MSXML2::IXMLDOMElementPtr pXMLElement, 
		HTREEITEM hRoot, int nIndent);
	void SaveStorageXml();
	static int CALLBACK CompareRatings(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareUsernames(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareNames(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	MADVANCED m_mAdvanced;
	CImageList *m_pimgRating;
	void ProcessSortOrder();
	SORTORDER m_soSortOrder;
	void SortItems(HTREEITEM hRoot);
	int m_nSortOrder;
	BOOL m_bAutosort;
	void SetPassword(TCHAR *pszPassword);
	void SetInfo(TCHAR *pszInfo);
	CStaticEx m_ctrlInfo;
	static UINT m_suMessage;
	BOOL m_bAutosave;
	BOOL m_bReloadLastStorage;
	BOOL m_bHotKeys;
	void UnregisterHotKeys();
	void RegisterHotKeys();
	void ConvertStorage(long lVersion);
	void RemoveTrayIcon(UINT nIconID);
	void ShowTrayMenu();
	void AddTrayIcon(UINT nIconID);
	// Current window state
	BOOL m_bMaximized; 
	// TRUE - hide to tray
	void TrayWindow(BOOL bMode); 
	BOOL m_bMinimizeToTray; // Option
	void SetKeyInfo(int nKeySize); // In bits, Zero clears everything
	CStaticEx m_ctrlKeyInfo;
	HACCEL m_hAccel;
	void SetNotes(TCHAR *pszNotes);
	void SetAddress(TCHAR *pszAddress);
	void SetDirty(BOOL bDirty);
	void EditCategory(HTREEITEM hItem);
	void EditElement(HTREEITEM hItem);
	void SwitchMode();
	CImageList *m_pimgSwitch;
	void DeleteItems(HTREEITEM hRoot, BOOL bFirstCall);
	void DeleteItem(HTREEITEM hItem);
	BOOL m_bShowPassword;
	CStaticHyperlinkEx m_ctrlPasswordLink;
	CStaticEx m_ctrlDescription;
	void CompactString(CDC *pDC, TCHAR *pszString, int nWidth);
	void SetLogin(TCHAR *pszLogin);
	void LoadTree(VTREE &rvTree, HTREEITEM hRoot);
	void SaveTree(VTREE &rvTree, HTREEITEM hRoot);
	CImageList *m_pimgListSmall;
	CImageList *m_pimgList;
	void SetTitle(TCHAR *pszTitle);
	void SetTitle();
	void InsertElement();
	void InsertCategory();
	static void DecryptPrivateEntry(PRIVATEENTRY &rpePrivate, HRC5CONTEXT hRc5);
	static void EncryptPrivateEntry(PRIVATEENTRY &rpePrivate, HRC5CONTEXT hRc5);
	void SetDescription(TCHAR *pszDescription);
	void ShowEntry(HTREEITEM hItem);
	MENTRY m_mEntries;
	long m_lIndex;
	HRC5CONTEXT m_hRc5;
	void CleanPrivateData();
	KEYINFO m_kiKeyInfo;
	CString m_strStorageName;
	void LoadStorage(BOOL bShowDialog);
	void SaveStorage(BOOL bSaveAs);
	void CloseStorage();
	void ProcessDirtyStorage();
	BOOL m_bDirty;
	void CreateStorage();
	void SwitchMenu(long lItems, BOOL bSwitchOn);
	HFONT m_hFont;
	CGroupedControls m_gcControls;
	enum GROUPS { TITLE /* When no Storage is active */,
		CATEGORY /* When category is selected */ ,		
		ELEMENT_INDETAIL /* Element in detail */};

	//
	// Password Generator Settings
	//
	BOOL m_bDecimalDigits;
	BOOL m_bLowercase;
	BOOL m_bPunctuation;
	BOOL m_bSpecial;
	BOOL m_bUppercase;
	int m_nPasswordLength;
	
	//
	// Hash Generator Options
	//
	int m_nHashOptions;

	//
	// Export To Xml
	//
	unsigned int m_nExportFlags;
	CString m_strExportFileName;
};

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

#endif // !defined(AFX_EXILEDLG_H__4CCF6630_637C_419F_9F46_7AE19F62C70B__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

Share

About the Author

AntonGogolev
Web Developer
Russian Federation Russian Federation
I'll think about it later on...

| Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 7 Mar 2005
Article Copyright 2004 by AntonGogolev
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid