Results 1 to 6 of 6

Thread: Picture for Window Background

  1. #1

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    Angry Picture for Window Background

    umm... this might be a kinda hard question, I dunno.

    I have a picture right?

    Code:
    HBITMAP		hBitmapBackground;
    HBRUSH		hBrush;
    
    hBitmapBackground = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_MAIN));
    hBrush = CreatePatternBrush(hBitmapBackground);
    DeleteObject(hBitmapBackground);
    And I'm about to set it to the background for my Window, but...
    The picture isn't square. It's circular. How can I make it so, that everything in the picture that is the colour white, goes invisible??

    So it reads each pixel in the picture, and if the pixel is white, then it just makes it invisible??
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    The only way I can think of is making a round rectangle region of the whole window and then put the bitmap on it.

    You should have some kind of colour. You cannot just make the pixel invisible(think so)
    Baaaaaaaaah

  3. #3

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    hmm

    But I'm gunna wanna make a function and use it for buttons and that 2. I know it's possible. I've seen it done. Any1 know how??
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  4. #4
    amac
    Guest
    Check this out.... it might help

    http://www.winprog.org/tutorial-old/#2.5.

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    how about after bitblt the image into the window, the call another 2 API CreateEllipticRgn and SetWindowRgn to make the window become circle.

    will this help?

  6. #6
    amac
    Guest
    I dont think he wants a circle window... He wants to use a mask to make the color around the circle transparent

    I could be wrong though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width