|
-
Jul 29th, 2001, 01:22 AM
#1
Thread Starter
Hyperactive Member
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 
-
Jul 29th, 2001, 01:34 AM
#2
PowerPoster
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)
-
Jul 29th, 2001, 02:02 AM
#3
Thread Starter
Hyperactive Member
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 
-
Jul 31st, 2001, 10:19 PM
#4
-
Aug 1st, 2001, 01:03 AM
#5
PowerPoster
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?
-
Aug 1st, 2001, 11:19 AM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|