我的程序加上VclSkin之后,关闭程序报地址错误。
解决方案 »
- 有一个小问题:{0
- 求助:怎么备份数据库和恢复数据库(SQL SERVER 2000),请各位大大帮帮我,谢谢!
- 如何建立组件数组?
- CSDN还是没有承认错误,继续播放日问广告
- 关于对象模板的思想
- 请问在excel中图表的几个设置方法?
- 为什么我装了ActiveSkin和Delphi后打开ActiveSkin里的一个例子,结果出现很多错误,根本不能用
- 怎样把一个表中的一个字段值加入COMBOBOX中,注意这个字段中的值有重复值,重复的只加一个
- 如何实现web环境下的精确打印?
- Delphi、BCB的TQuery存储极限问题和对标准Sql语句的转化问题
- 使用ShellAbout打开关于对话框,怎么出现错误了?
- indy 邮件解码的问题!!utf8无法解决
楼主遇到的问题,可能是个别有问题的皮肤文件导致的,不过vclskin在win2003中确实有问题。
procedure TWinSkinForm.GetIcon(var bmp:Tbitmap);
var
SmallIcon: HIcon;
cx, cy,i: Integer;
sd:Tskindata;
begin
cx := GetSystemMetrics(SM_CXSMICON);
cy := GetSystemMetrics(SM_CYSMICON);
// bmp.Assign(nil);
// bmp.canvas.brush.color:=clFuchsia;
bmp.width:=cx;bmp.height:=cy;
bmp.PixelFormat := pf16bit;
bmp.Canvas.Brush.color:=clFuchsia;
bmp.canvas.fillrect(rect(0,0,cx,cy));
iconx:=cx;
// First try a small icon, then a big icon
DefIcon := SendMessage(hwnd, WM_GETICON, ICON_SMALL, 0);
if DefIcon = 0 then
DefIcon := SendMessage(hwnd, WM_GETICON, ICON_BIG, 0); if DefIcon <> 0 then begin
SmallIcon := CopyImage(DefIcon, IMAGE_ICON, cx, cy, LR_COPYFROMRESOURCE);
DrawIconEx(bmp.Canvas.Handle, 0, 0, SmallIcon,
cx, cy, 0, 0, DI_MASK or DI_IMAGE );//DI_NORMAL);
DestroyIcon(SmallIcon);
//end else if not fsd.sysicon.empty then begin //otherwise no icon found
//cause DLL exception
//bmp.assign(fsd.sysicon) ;
//bmp.PixelFormat := pf24bit;
//copybmp(sd.SysIcon,bmp);
end else begin
for i:= 0 to skinmanager.dlist.count-1 do begin
sd:= Tskindata(skinmanager.dlist.items[i]);
if sd.skinformtype=sfMainform then begin
if not sd.sysicon.empty then
//copybmp(sd.SysIcon,bmp);
//bmp.assign(sd.sysicon) ;
end;
end;
end;
end;