draw in windows

hello, I would like to use opengl in a window and draw only half size (width/2 and height/2) and use the unused part for GDI. I have tried to change viewport and it work but It clear all the window and not only the quarter I want… Any idea ?
Thanks
Alfred

create a child window within the main window;
create a gl context and use MakeCurrent/SwapBuffers
with reference to the child window’s hdc.

I’m inclined to think the scissor test may be an easier way?

Not quite sure if it would work properly, though… are you double buffering? That would most likely muck things up.

thank you, I am trying to make it…
What is scissor test ? Yes double buffer…
thank you
Alfred