Thread: Background Image

  1. #1
    Registered User
    Join Date
    Mar 2007

    Unhappy Background Image

    Hey guys, I have a small question. I don't think its hard to do, but search on the net didn't return anything good. I want to have a bitmap image as my background in my dialog. I tried adding it like a image but then it hides all my controls and buttons...

    Can anyone point me to the right direction? Thanks

  2. #2
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Tijuana, BC, México
    1) Did you try adding first the image and later the controls, on top of the image?
    2) See WM_CTLCOLORDLG, it uses HBRUSH to paint the dialog background, CreatePatternBrush might help you
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  3. #3
    Math wizard
    Join Date
    Dec 2006
    Have the image drawn as the background, then have the buttons and controls drawn on top. When drawing scenes, always draw back to front.
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  4. #4
    Registered User
    Join Date
    Mar 2007
    Awesome! thanks guys.

  5. #5
    Registered User
    Join Date
    Mar 2007
    EDIT Fixed sorry for the double post.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Simple Image Processing
    By ejohns85 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2009, 12:10 PM
  3. background image on form
    By luigi40 in forum C# Programming
    Replies: 0
    Last Post: 07-14-2005, 05:41 AM
  4. how to set a background as a image?
    By Rare177 in forum Windows Programming
    Replies: 14
    Last Post: 06-09-2004, 09:50 AM
  5. Changing background color of irregular image
    By Tesita in forum C++ Programming
    Replies: 5
    Last Post: 11-03-2003, 07:17 PM
Website Security Test