Background Bitmap in CMDIFrameWnd

Posted on 1998-03-15
Last Modified: 2013-11-20
How do I display a bitmap, or pattern in the frame window of an MDI application? I would like to display a logo etc when no Child windows are open.
Question by:cjs

Accepted Solution

scroll0 earned 50 total points
ID: 1316996
            CBitmapClient m_wndClient;
         //OnCreate(LPCREATESTRUCT lpCreateStruct)
            TRACE("Failed Load BitMap");
            return -1;

//CBitmapClient Haeder File
// BitmapClient.h : header file

// CBitmapClient window
class CBitmapClient : public CWnd
// Construction

// Attributes

// Operations

// Overrides
      // ClassWizard generated virtual function overrides

// Implementation
      virtual ~CBitmapClient();

      // Generated message map functions
      afx_msg void OnSize(UINT nType, int cx, int cy);
      afx_msg BOOL OnEraseBkgnd(CDC* pDC);
      afx_msg void OnMouseMove(UINT nFlags, CPoint point);
      afx_msg void OnLButtonUp(UINT nFlags, CPoint point);


// BitmapClient.cpp : implementation file

#include "stdafx.h"
#include "ViewG.h"
#include "BitmapClient.h"

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

// CBitmapClient




// CBitmapClient message handlers

void CBitmapClient::OnSize(UINT nType, int cx, int cy)
      CWnd::OnSize(nType, cx, cy);
      RedrawWindow(NULL, NULL,
      return ;  

BOOL CBitmapClient::OnEraseBkgnd(CDC* pDC)
         //Here BitMap File Load
   return TRUE;

void CBitmapClient::OnMouseMove(UINT nFlags, CPoint point)
      // TODO: Add your message handler code here and/or call default
      CWnd::OnMouseMove(nFlags, point);

void CBitmapClient::OnLButtonUp(UINT nFlags, CPoint point)
      // TODO: Add your message handler code here and/or call default
      CWnd::OnLButtonUp(nFlags, point);


Author Comment

ID: 1316997


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now