Click here to Skip to main content
15,881,380 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 254.8K   7.4K   111  
Yet another password manager.
// StaticEx.cpp : implementation file
//

#include "stdafx.h"
#include "StaticEx.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CStaticEx

CStaticEx::CStaticEx()
{
//	m_hBrush = ::CreateSolidBrush(::GetSysColor(
}

CStaticEx::~CStaticEx()
{
	m_fnFont.DeleteObject();
}


BEGIN_MESSAGE_MAP(CStaticEx, CStatic)
	//{{AFX_MSG_MAP(CStaticEx)
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStaticEx message handlers

HBRUSH CStaticEx::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	HBRUSH hBrush = NULL;
	
	if(nCtlColor == CTLCOLOR_STATIC)
	{
		if((GetStyle() & 0xFF) <= SS_RIGHT)
		{
			if(!((HFONT)m_fnFont))
			{
				LOGFONT lf;

				GetFont()->GetObject(sizeof(lf), &lf);
				lf.lfWeight = FW_BOLD;

				m_fnFont.CreateFontIndirect(&lf);
			}

			pDC->SelectObject(&m_fnFont);
			pDC->SetBkMode(TRANSPARENT);

			hBrush = (HBRUSH)::CreateSolidBrush(::GetSysColor(COLOR_BTNFACE));
		}
	}

	return hBrush;
}

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