TIcon *pIcon = new TIcon();
WORD wIndex;
HICON hIcon=ExtractAssociatedIcon(HInstance,"c://windows//explorer.exe", &wIndex);
pIcon->Handle =hIcon;
Form1->Icon = pIcon;
Image1->Picture = (TPicture *)pIcon;
WORD wIndex;
HICON hIcon=ExtractAssociatedIcon(HInstance,"c://windows//explorer.exe", &wIndex);
pIcon->Handle =hIcon;
Form1->Icon = pIcon;
Image1->Picture = (TPicture *)pIcon;
博客展示了一段C语言代码,通过ExtractAssociatedIcon函数从指定的exe文件(c://windows//explorer.exe)中提取关联图标,将其赋值给TIcon对象,然后将图标显示在Form1和Image1上。

1604

被折叠的 条评论
为什么被折叠?



