bcb 6 怎么获取应用程序的图片,是要64*64以下的哦。挣扎了几天,还是没有收获,希望各位帮个忙。多谢
bcb 6 如何获取应用程序的图片,是要64*64以下的哦。挣扎了几天,还是没有收获,希望各位帮个忙。谢谢
答案当然是越详细越好啦
------解决方案--------------------
应用程序的图片不是ICO格式的吗?嗯!我看着你的贴!
------解决方案--------------------
答案当然是越详细越好啦
------解决方案--------------------
应用程序的图片不是ICO格式的吗?嗯!我看着你的贴!
------解决方案--------------------
- C/C++ code
total=0; hIcon=NULL; ImageList1->Clear(); ListView1->Clear(); OpenDialog1->Execute(); filename=OpenDialog1->FileName; Edit1->Text=filename; total=(int)ExtractIcon(this->Handle,filename.c_str(),-1); //If the file is an .ICO file, the return value is 1. if(total==1) { hIcon = ExtractIcon( this->Handle, filename.c_str(), 0);//提取图标 Icon1->Handle=hIcon; ImageList1->AddIcon(Icon1); ListItem1=ListView1->Items->Add(); ListItem1->Caption=ListView1->GetCount()-1; ListItem1->ImageIndex=0; } for(int i=0;i<total;i++) { hIcon = ExtractIcon( this->Handle, filename.c_str(), i);//提取图标 Icon1->Handle=hIcon; ImageList1->AddIcon(Icon1); ListItem1=ListView1->Items->Add(); ListItem1->Caption=ListView1->GetCount()-1; ListItem1->ImageIndex=i; }