I'm trying to create a .NET application that uses OpenGL. I need to have 4 viewports, but instead of creating 4 controls and syncing them, I'm going to have 1 control that is split into 4 viewports. I want to paint lines over the OpenGL control to split up the viewports visually. I'm using a custom control, and to accomplish this, I have two panels on top of the base UserControl. The Panel in the middle is the OpenGL panel, where the OpenGL output is renderered. The panel on the top is where I'm going to draw the viewport dividers, and it has transparency so I can see the panel beneath it.
The problem is, when the OpenGL viewport loads (it's in a separate thread, so it's just black for a few seconds), it covers up the entire UserControl, regardless of its z layer. If I shrink the OpenGL panel, I can see that it still paints only on the panel, but it just doesn't care about what's above it--it just covers it up.
Why is this happened? If you want to see how I'm creating the OpenGL context and such, you can see the tutorial I followed. I'm passing the Handle of the Panel, not of the UserControl. Do all the controls in the custrom control share the same device context or something?