 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
sdavid Guest
|
Posted: Fri Jun 16, 2006 5:45 pm Post subject: Save the extracted icons |
|
|
Hello,
I created a Form with two Image and a button. In one of the image I
have choose the image (an icon) from the image properties and for the
button I have written this code:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TIcon *iconx=new TIcon;
iconx->Handle=ExtractIconA(NULL,Application->ExeName.c_str(),0);
Image2->Picture->Icon=iconx;
Image1->Picture->Icon->SaveToFile("C:\\test\\BCB tests\\icon1.ico");
Image2->Picture->Icon->SaveToFile("C:\\test\\BCB tests\\icon2.ico");
delete iconx;
}
Now when I press Button1 the first icon (the icon that belongs to the
Image1) is saved correctly. But the second icon (the icon that belongs
to Image2) is saved in 16 colors although the icon is in 256 colors.
The extracted icon that is inserted into Image 2 is correctly displayed
in Image2 but it is not saved correctly.
Can someone please tell (if possible not trough links) me why does this
happens and what I have to do to save the extracted icons correctly? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|