943,752 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3286
  • C++ RSS
Nov 10th, 2008
0

Background image

Expand Post »
I want to simply put an image as background of my parent window. Is it possible to put this into the class?
C++ Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 26
Solved Threads: 9
Junior Poster in Training
brechtjah is offline Offline
92 posts
since Nov 2008
Nov 10th, 2008
0

Re: Background image

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.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: User input chdir c++
Next Thread in C++ Forum Timeline: visualcplusplus gray-out





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC