Is it possible to save an icon from a .RC file to a file ?
Is it possible to save an icon from a .RC file to a file ?
You can save it from a RES file but you can't save it from a RC file as you only have the icon name there.
The RES file does include the icon contents.
Simply open the RES file with a resources editor and save the icon file
Open the EXE with the resources editor and save the icon
hIcon := LoadIcon( GetResources(), cResIcoName )
FW_SaveHIconToIco( hIcon, "name.ico" )FW_SaveImage( BmpResourceName, "name.bmp" )FW_SaveImage( BmpResourceName, "name.png" )BOOKSICO ICON "..\icons\books.ico"
CHARTICO ICON "..\icons\chart.ico"
USERSICO ICON "..\icons\users.ico"
SEA BITMAP "..\bitmaps\sea.bmp"
OLGA 10 "..\bitmaps\olga1.jpg"#include "fivewin.ch"
function Main()
local oWnd, oIco, oBar, oBtn
DEFINE ICON oIco RESOURCE "BOOKSICO"
DEFINE WINDOW oWnd ICON oIco SIZE 600,400 PIXEL
DEFINE BUTTONBAR oBar SIZE 140,30 2007
DEFINE BUTTON OF oBar PROMPT "OLGA.JPG->PNG" CENTER ACTION ( ;
FW_SaveImage( "OLGA", "olga.png" ), XImage( "olga.png" ) )
DEFINE BUTTON OF oBar PROMPT "SEA.BMP->JPG" CENTER ACTION ( ;
FW_SaveImage( "SEA", "sea.jpg", 100 ), XImage( "sea.jpg" ) )
DEFINE BUTTON OF oBar PROMPT "SAVE-ICO" CENTER ACTION ( ;
FW_SaveHIconToIco( LoadIcon( GetResources(), "BOOKSICO" ), "books2.ico" ), ;
XImage( "books2.ico" ) )
ACTIVATE WINDOW oWnd CENTERED
return nilThank you ! That's just what I need.