Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Render Windows and Windows Forms  (Read 3807 times)

0 Members and 1 Guest are viewing this topic.

Megatron

  • Newbie
  • *
  • Posts: 22
    • View Profile
Render Windows and Windows Forms
« on: July 09, 2010, 04:53:00 am »
I was wondering if someone could answer this, since I can't seem to figure out if this is even possible.

I want to use Windows Forms to do the GUI by overlaying Custom Form controls on the Render surface. Im doing SFML rendering on a user control which i attach to my main Form. The rendering works fine, but when I try and overlay WindowsFormsControls, this ends up happening http://garyoak.com/images/renderingControls.jpg The one on the left is what usually happens, the one on the right is what i get if i constantly invalidate the control and trigger the OnPaint event. Is there a better way to do this? Constantly invalidating multiple controls seems slow and it causes noticeable flicker in some of the controls. Additionally the constant redraw causes access memory violations sometimes if i move the window around alot/move other windows rapidly over the game.

Thanks

 

anything