- use themed border for TCustomControl if themes are enabled in application
- misc

git-svn-id: trunk@11952 -
This commit is contained in:
paul 2007-09-07 03:52:32 +00:00
parent 2fd8219767
commit 655e3ccb20
2 changed files with 11 additions and 2 deletions

View File

@ -1001,7 +1001,6 @@ Var
function HandleUnicodeChar(AChar: Word): boolean;
var
UTF8Char: TUTF8Char;
Handled: Boolean;
begin
Result := false;
@ -2150,6 +2149,15 @@ begin
else LMessage.Result := 1;
end;
end;
WM_NCPAINT:
begin
if (lWinControl <> nil) and TWin32ThemeServices(ThemeServices).ThemesEnabled and
(lWinControl is TCustomControl) then
begin
TWin32ThemeServices(ThemeServices).PaintBorder(lWinControl, True);
LMessage.Result := 0;
end;
end;
end;
// convert from win32 client to lcl client pos.

View File

@ -140,7 +140,8 @@ begin
with Params do
begin
SubClassWndProc := @SpinWindowProc;
Buddy := CreateWindowEx(WS_EX_CLIENTEDGE, 'EDIT', StrCaption, Flags Or ES_AUTOHSCROLL, Left, Top, Width, Height, Parent, HMENU(Nil), HInstance, Nil);
Buddy := CreateWindowEx(WS_EX_CLIENTEDGE, 'EDIT', StrCaption,
Flags or ES_AUTOHSCROLL, Left, Top, Width, Height, Parent, HMENU(nil), HInstance, nil);
Window := CreateUpDownControl(Flags or DWORD(WS_BORDER or UDS_ALIGNRIGHT or UDS_ARROWKEYS),
0, 0, // pos - ignored for buddy
0, 0, // size - ignored for buddy