Link to home
Start Free TrialLog in
Avatar of BazookaJoeZone
BazookaJoeZone

asked on

MDI Background image

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
ASKER CERTIFIED SOLUTION
Avatar of mahesh1402
mahesh1402
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BazookaJoeZone
BazookaJoeZone

ASKER

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
You can subclass window procedure as above with SetWindowLong

-MAHESH