Solved

MDI Background image

Posted on 2006-07-20
3
736 Views
Last Modified: 2013-11-20
Hi,

I have a standard MDI application. Can someone tell me how to draw a bitmap in the client area of the main frame? (A complete working example would be great).

Thanks
0
Comment
Question by:BazookaJoeZone
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 250 total points
ID: 17151519
look at this :

Drawing Image on MDI Main Frame background
http://www.codeproject.com/dialog/mdibackgroundimage.asp

-MAHESH
0
 
LVL 3

Author Comment

by:BazookaJoeZone
ID: 17160516
Hi Mahesh,

Alright I gave it a try. The sample uses:

    SetWindowLong(hMain, GWL_WNDPROC, (long)pfnNewWndProc);

to override the size and erase bg messages in a new message loop function. Is it possible to accomplish the same thing with the standard MFC message mappings?

If not, is it possible to selectively use the new message handler at runtime?

    if (bSomething) {
        SetWindowLong(hMain, GWL_WNDPROC, (long)pfnNewWndProc);
    }
    else {
        SetWindowLong(hMain, GWL_WNDPROC, (long)pfnOriginalWndProc);
    }

Thanks
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17161995
You can subclass window procedure as above with SetWindowLong

-MAHESH
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

19 Experts available now in Live!

Get 1:1 Help Now