wxEuphoria - bitmap works on Linux but not Windows
The following code works on Linux but not on Windows.
On Linux it works: shows a picture while the data is loading.
On Windows there is no picture.
Same source code Linux and Windows.
constant
bmpSplash = create(wxBitmap,{BM_FROM_FILE,"bigkick.bmp",wxBITMAP_TYPE_BMP})
procedure onPaint_pnlSplash( atom this, atom id, atom event_type, atom event )
sequence extent
atom dc,x,y
dc = create(wxPaintDC, {this})
extent = get_bitmap_size( bmpSplash )
x = (splash_width - extent[1]) / 2
y = ((splash_height - 100) - extent[2]) /2
y += 100
x = floor(x)
y = floor(y)
draw_bitmap( dc, bmpSplash, x, y, 0)
delete_instance( dc )
end procedure
set_event_handler(pnlSplash,get_id(pnlSplash),wxEVT_PAINT,routine_id("onPaint_pnlSplash"))
This code works on Linux, but not Windows.
I want it to work on both Linux and Windows.
How can I get it to work on Windows?
I tried refresh_window(pnlSplash). That made it not work on Linux.
I tried refresh_window(pnlSplash) after delete_instance(dc) and before.
No good either place.
|
Not Categorized, Please Help
|
|