954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Background image

I want to simply put an image as background of my parent window. Is it possible to put this into the class?

wc.hbrBackground  = image


I've been looking all over Google, maybe I'm using the wrong keywords but I'm not finding anything. Anyway, on top of that image, would it be possible to clear out the title bar of my form together with the close, minimize buttons? The image I will place as a background already looks like a window...
I'm working with Dev C++ and using Win32 API
If anyone could help me out on this you would be very well appreciated, I'm creating a big program to learn wide aspects of win32

brechtjah
Junior Poster in Training
92 posts since Nov 2008
Reputation Points: 26
Solved Threads: 9
 

Nope, hbrBackground only accepts HBRUSH, not an image. If you want to do this, you will have to draw it yourself. Try looking up the WM_PAINT and WM_ERASEBKGND messages, and manually paint the image on your parent window in your message handler. By posting some code, I could help more.

William Hemsworth
Posting Virtuoso
1,591 posts since Mar 2008
Reputation Points: 1,429
Solved Threads: 129
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You