wx.NET Background Images, Double Buffering, and Shaped Frames

Alexander Olk <[email protected]> Thu, 02 Sep 2004 12:08:54 +0200
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <1094119734.3458.11.camel@Dellkiste>
Forwared message from Dan Moorhead <dan at xeonxstudios.com>

##################################################
TITLE: wx.NET Background Images, Double Buffering, and Shaped Frames

I have scouwered the internet trying to figure out how to have a
background image to no avail. The ImageViewer overides OnDraw to draw
directly to the ScrolledWindow, but if a Sizer is placed on top of this,
then it covers it up?! I tried using a StaticBitmap and BitmapButton as
the parent and adding children directlly to them as well as through a
Sizer, but that didnt work to well either. With WinForms and even GTK#
this was a simple task, why is it now so complicated?
I am also attempting to utilize DoubleBuffering using BufferedPaintDC,
but i dont see how i can get the children to use it to render themselves
using it as opposed to using the default DC. If i create an instance of
the BufferedPaintDC in the Paint event handler then it will be blited
for me upon its destruction, but how how do i get the controls to render
to it instead? I am using both wxCLIP_CHILDREN and
wxNO_FULL_REPAINT_ON_RESIZE, but it is a GUI for a game engine and
therfore is critical that there is no flickering.
Also, is there any way to get the Handle from a wx.Window, i know that
GetHandler() is implemented in wxWidgets. I need the handle for OpenGL
to render to it.

Also, i know that transparency is pretty hard for linux and other OS's,
but i noticed that there is a Transparent fill style for the DC's. Is
there a way to not render the background of controls by say subcribing
to the render background event. Would this achieve the effect of say a
"shaped" frame which only renders part of itself and is "transparent" in
the rest of the areas. 

_________________________________________________________
Dan Moorehead
Student - Illinois Math & Science Academy (http://www.imsa.edu)
Software Architect -  Xeonx Studios (http://xeonxstudios.com)
Project Founder - RealmForge GDK (http://sf.net/projects/realmforge)
Project Founder - Ninestar Horizons
(http://xeonxstudios.com/?url=NinestarHorizons/)




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click