Hi,

thanks for adding this function to enable adding bitmaps for tool bar 
items from a resource file.
I'm sorry to note that on my Windows XP the extension does not work. 
Perhaps you can add this to your bug list!?

In detail: In my application, I defined a function to use the new 
functionality like this:

myToolMenu tbar menuItem iconName = do
   icon <- iconCreateLoad iconName wxBITMAP_TYPE_BMP_RESOURCE (sz 16 16) -- 
does not display bitmaps!
   -- icon <- iconCreateLoad iconName wxBITMAP_TYPE_ICO_RESOURCE (sz 16 16) -- 
crashes!
   toolMenuFromBitmap tbar menuItem "" icon []


I observe the following behavior:
a) When using wxBITMAP_TYPE_BMP_RESOURCE the application starts, but no 
bitmaps are displayed for the tool items.
b) When using wxBITMAP_TYPE_ICO_RESOURCE the application crashes when 
starting

The resource file looks as follows:

ABOUT               ICON    DISCARDABLE     "bitmaps/about.ico"
CLOSETAB            ICON    DISCARDABLE     "bitmaps/closetab.ico"
...


which is compiled to a .o file using windres.exe from ghc-6.10.1\bin and 
the mingw gcc and then linked to the executable.
In contrast, setting the icon for the top level window using this method 
works fine:

  ico_about <- iconCreateLoad "ABOUT" wxBITMAP_TYPE_ICO_RESOURCE (sz 16 16)
  topLevelWindowSetIcon f ico_about


Any advice?

Thanks,
Bernd


------------------------------------------------------------------------------
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to