Save hicon to a .ico file
Posted on 2002-03-03
Q: How to save an HICON to a .ico file
VC6, Needs to work on Win 95 and up. Can be MFC or Win API.
Ideally work for whatever the hicon contains, but failing that a version which works with 32X32 16 color icons would do.
BOOL MySaveIcon( hIcon, LPCSTR lpszFile )
// <-------what goes here
int main( int argc, char * argv )
HICON hIcon ;
// etc. etc. lots of stuff setting up hIcon
MySaveIcon( hIcon "c:\\example.ico" ) ;