PDA

View Full Version : Can I use GDI drawing routines in an OpenGL window (e.g. a button)



Menne
02-04-2002, 06:08 AM
I think the topic is self explaining.
I just want to know if I can draw a button or a scrollbar into an OpenGL window, or do I have to draw it myslef using the OpenGL functions instead of the windows GDI functions?

I just want to create a Window with scroll bars which supports OpenGL drawing routines.

Thanks,
Menne

Lev
02-04-2002, 06:15 AM
Bad thing, don't do it. Results of mixing GDI and OpenGL aren't really predictable (my experience)

-Lev

Menne
02-04-2002, 12:43 PM
So it is possible?
Until now, all test I have written crashes.

It's just so that I need scrollbars and I don't want to calculate and draw them with OpenGL myself.

BTW, I'm using a glOrtho projection.

[This message has been edited by Menne (edited 02-04-2002).]

opla
02-05-2002, 01:58 AM
MSDN's PIXELFORMATDESCRIPTOR help :
PFD_SUPPORT_GDI: The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation.

Look for a pixel format that support PFD_SUPPORT_GDI, but I doubt you'll find an interesting one.