Click here to Skip to main content
15,896,606 members
Articles / Desktop Programming / MFC

Change the background color of the frame area of an MDI application.

Rate me:
Please Sign up or sign in to vote.
4.93/5 (29 votes)
12 Apr 20072 min read 81.6K   894   31  
This article describes how to change the color of Frame Windows client area by subclassing the control which draws the background.
// MDIFrameBackground.h : main header file for the MDIFrameBackground application
//
#pragma once

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols


// CMDIFrameBackgroundApp:
// See MDIFrameBackground.cpp for the implementation of this class
//

class CMDIFrameBackgroundApp : public CWinApp
{
public:
	CMDIFrameBackgroundApp();


// Overrides
public:
	virtual BOOL InitInstance();

// Implementation
	afx_msg void OnAppAbout();
	DECLARE_MESSAGE_MAP()
};

extern CMDIFrameBackgroundApp theApp;

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
Architect
United States United States
Ali Rafiee has been developing windows applications using C++ since 1991, and he hasn't looked back since. Ali has been a software development consultant for must of his career, but he has finally settled down and has been working for an educational software company since 2000. While he is not working, he is either learning C#, flying airplanes, playing with his daughter, or answering peoples question on newsgroups, he finds that to be a great learning tool for himself.

Ali is also a Microsoft Visual C++ MVP.

Comments and Discussions