Background image

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 91
Reputation: brechtjah is an unknown quantity at this point 
Solved Threads: 9
brechtjah's Avatar
brechtjah brechtjah is offline Offline
Junior Poster in Training

Background image

 
0
  #1
Nov 10th, 2008
I want to simply put an image as background of my parent window. Is it possible to put this into the class?
  1. 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
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1,400
Reputation: William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of 
Solved Threads: 113
Sponsor
William Hemsworth William Hemsworth is offline Offline
Nearly a Posting Virtuoso

Re: Background image

 
0
  #2
Nov 10th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC