Win32 Controls Question

Started by
2 comments, last by Talib 18 years, 10 months ago
Hi, I'm making a fairly simple game using GDI and I've got a small problem which I can't seem to figure out (I'm not really that experienced with Win32). I'm drawing all my graphics at the moment through my own function (called from inside the message loop) and I've set up a pretty simple backbuffer/flipping system. The thing is I'd like to be able to use windows controls on the screen at the same time, but when I create a button it gets written over by the Clear() and Flip(). Is there anyway to stop this? A way I can redraw the buttons when I want too (i.e. After I have flipped the other graphics to the window)? I know this question probably seems pretty stupid but I have looked around and can't seem to find anything. Thanks, Jon Lowe
Advertisement
Try setting the WS_CLIPCHILDREN style on the main window when you create it; that should help.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

That works fine now using that.

Thanks, very much appreciated.
Hi

After recent experience with the GDI, using a backbuffer and flipping will become very slow. I rather opted for a combination of ExcludeClipRect(), SelectRgn(), RectVisible() (Not sure if these are the completely correct spelling of the functions). You can look at Catch 22 Flicker Free Drawing
Try, try and fucking try again.

This topic is closed to new replies.

Advertisement