anchordocking: default close button if theme does not support it

git-svn-id: trunk@31704 -
This commit is contained in:
mattias 2011-07-15 18:33:27 +00:00
parent 441839dd38
commit e0b91a2f5e
2 changed files with 11 additions and 7 deletions

View File

@ -1683,14 +1683,18 @@ end;
procedure TAnchorDockMaster.CreateCloseButtonBitmap;
var
BitmapHandle,MaskHandle: HBITMAP;
OrigBitmap: TBitmap;
OrigBitmap: TCustomBitmap;
begin
if fCloseBtnBitmap<>nil then exit;
ThemeServices.GetStockImage(idButtonClose,BitmapHandle,MaskHandle);
OrigBitmap:=TBitmap.Create;
OrigBitmap.Handle:=BitmapHandle;
if MaskHandle<>0 then
OrigBitmap.MaskHandle:=MaskHandle;
if ThemeServices.GetStockImage(idButtonClose,BitmapHandle,MaskHandle) then begin
OrigBitmap:=TBitmap.Create;
OrigBitmap.Handle:=BitmapHandle;
if MaskHandle<>0 then
OrigBitmap.MaskHandle:=MaskHandle;
end
else
OrigBitmap := GetDefaultButtonIcon(idButtonClose);
DockMaster.fCloseBtnBitmap:=TBitmap.Create;
with DockMaster.fCloseBtnBitmap do begin
SetSize(HeaderButtonSize,HeaderButtonSize);

View File

@ -1456,7 +1456,7 @@ begin
if fCompilerMessages.Count = 0 then fCompilerMessages.SetDefault;
UseMsgFile := aXMLConfig.GetValue(p+'CompilerMessages/UseMsgFile/Value', False);
MsgFileName := aXMLConfig.GetValue(p+'CompilerMessages/MsgFileName/Value', '');
if UseMsgFile and FileExists(MsgFileName) then
if UseMsgFile and FileExistsCached(MsgFileName) then
fCompilerMessages.LoadMsgFile(MsgFileName);
for i := 0 to fCompilerMessages.Count - 1 do begin