When to set palette???
I don't really understand... why are you using HBRUSH to define a color in Direct Draw?
I'm not using HBRUSH to define a color in direct draw. I'm just blitting simple rectangles on top of random pixels. One of the RECT parameters takes an HBRUSH. Its just that the color ends up blue instead of gray and I'm wondering if this has anything to do with where I attach the palette at or is it because of something else. Thanks, friz
------------------
Still Learning...
Still Learning...
The brushes specified in the window headers, are al numbers. Everything is just a number in windows. So, if you use the Gray Brush, you will actually use an integer number.
So, if that number is blue in the palette you have set, than you will end up with blue in the place you draw the rectangle.
------------------
Dance with me......
I need to know when I should set the palette.
I created a simple primary surface in my Init() function and then in my Main() I simply plot random pixels and blit random RECT's over top of it. The rect are given an (HBRUSH)GRAY_BRUSH parameter but the rectangles end up blue. I tried setting the palette to my lpddpalette object in the Init() and also at the very end of Main() before it returns. Both ways end up with the same results. Any ideas?
------------------
Still Learning...
Still Learning...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement