Environment: wxLua on Windows 7 x64 system
Description: I use a '.dll' resource file for my icons. The '.o' object file for this resource was created with windres with the following icons:
Code: Select all
1 ICON DISCARDABLE "icon_16x16.ico"
2 ICON DISCARDABLE "icon_32x32.ico"
3 ICON DISCARDABLE "icon_48x48.ico"
4 ICON DISCARDABLE "icon_64x64.ico"
5 ICON DISCARDABLE "icon_96x96.ico"
And here is my problem:
Lua code:
Code: Select all
-- file path
file_icons = CLIB_PATH .. "icons.dll"
-- icons
ico_16 = wx.wxIcon( file_icons .. ";0", wx.wxBITMAP_TYPE_ICO, 16, 16 )
ico_32 = wx.wxIcon( file_icons .. ";1", wx.wxBITMAP_TYPE_ICO, 32, 32 )
ico_48 = wx.wxIcon( file_icons .. ";2", wx.wxBITMAP_TYPE_ICO, 48, 48 )
ico_64 = wx.wxIcon( file_icons .. ";3", wx.wxBITMAP_TYPE_ICO, 64, 64 )
ico_96 = wx.wxIcon( file_icons .. ";4", wx.wxBITMAP_TYPE_ICO, 96, 96 )
-- test 1: display icon with 32x32
bmp_32 = wx.wxBitmap()
bmp_32:CopyFromIcon( ico_32 )
X, Y = bmp_32:GetWidth(), bmp_32:GetHeight()
control = wx.wxStaticBitmap( panel, wx.wxID_ANY, wx.wxBitmap( bmp_32 ), wx.wxPoint( 20, 10 ), wx.wxSize( X, Y ) )
--> RESULT: the icon with 32x32 is displayed without problems
-- test 2: display icon with 64x64
bmp_64 = wx.wxBitmap()
bmp_64:CopyFromIcon( ico_64 )
X, Y = bmp_64:GetWidth(), bmp_64:GetHeight()
control = wx.wxStaticBitmap( panel, wx.wxID_ANY, wx.wxBitmap( bmp_64 ), wx.wxPoint( 20, 50 ), wx.wxSize( X, Y ) )
--> RESULT: no icon, the panel will remain empty, nothing to see but no interpreter errors so far