icon from a .RC file
Posted: Thu Nov 14, 2024 8:26 pm
Is it possible to save an icon from a .RC file to a file ?
www.FiveTechSoft.com
https://fivetechsupport.com/forums/
Code: Select all | Expand
hIcon := LoadIcon( GetResources(), cResIcoName )
FW_SaveHIconToIco( hIcon, "name.ico" )
Code: Select all | Expand
FW_SaveImage( BmpResourceName, "name.bmp" )
Code: Select all | Expand
FW_SaveImage( BmpResourceName, "name.png" )
Code: Select all | Expand
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"
Code: Select all | Expand
#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 nil