void YourCustomWindow::OnPaint( wxPaintEvent& event ) {
wxPaintDC dc(this);
wxImage image( width, height );
image.InitAlpha();
unsigned char* imgdata = img.GetData();
unsigned char* imgalpha = img.GetAlpha();
// manipulate raw memory buffers to populate
// them with whatever image you like.
// Putting zeros everywhere will create a fully
// transparent image.
// almost done, but not quite...
// wxDC can only draw wxBitmaps, not wxImage,
// so one last step is required
//
wxBitmap bmp( image );
dc.DrawBitmap( bmp, 0, 0 );
}