How do i make my window see-through, i want to display a bmp inside the window, then make it invisible so just the bmp is left, i tried using
but the 'inivisble' part never repaints.Code:wc.hbrBackground = HBRUSH(0);
How do i make my window see-through, i want to display a bmp inside the window, then make it invisible so just the bmp is left, i tried using
but the 'inivisble' part never repaints.Code:wc.hbrBackground = HBRUSH(0);
I'm not sure exactly what you mean, but I've done something similar before.
I gave my window the WS_POPUPWINDOW (or was it WS_POPUP) style, to remove the caption. Then I made the size of the window's client area so that it was the exact same size as the bitmap.
Then in the WM_PAINT notification, I BitBlt()ed my bitmap onto the window.
Erm...did that make sense? =P
P.S. my bitmap was rectangular. if your's is irregular, you might want to take a look at window regions
yea thats basicly what im doing, just i need to get rid of the grey parts seeing as my bmp isnt perfectly rectangular
I see, then perhaps you should consider Window Regions.
Because setting a null(0) to a window's background brush doesn't make it invisible.
Here's a relatively good tutorial on the topic:
http://www.flipcode.com/articles/art...n32skins.shtml
To set your background invisible. Then in your windows class use:
hbrbackground = (HBRUSH) GetStockObject (HOLLOW_BRUSH);
I think thats right im not sure.
exactly the same effect as HBRUSH(0);
have you looked at
WS_EX_TRANSPARENT
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Try painting the window a color that isnt included in your image. Then make that color transparent, that way your image shows up and all the areas that showed up around it because of the image being irregular will be transparent. At least in theory.