mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 14:18:14 +02:00
fix drawing of listbox, combobox, edit to be non-transparent even in winxp tabpage (fixes black background upon scroll)
git-svn-id: trunk@6190 -
This commit is contained in:
parent
8960dd3810
commit
4abc2f15e5
@ -538,7 +538,9 @@ Begin
|
|||||||
// transparently
|
// transparently
|
||||||
// only static and button controls have transparent parts
|
// only static and button controls have transparent parts
|
||||||
// others need to erased with their window color
|
// others need to erased with their window color
|
||||||
if ((Msg = WM_CTLCOLORSTATIC) or (Msg = WM_CTLCOLORBTN)) then
|
// scrollbar also has buttons
|
||||||
|
if (Msg = WM_CTLCOLORSTATIC) or (Msg = WM_CTLCOLORBTN)
|
||||||
|
or (Msg = WM_CTLCOLORSCROLLBAR) then
|
||||||
begin
|
begin
|
||||||
if WindowInfo^.isGroupBox then
|
if WindowInfo^.isGroupBox then
|
||||||
begin
|
begin
|
||||||
@ -546,18 +548,11 @@ Begin
|
|||||||
end else
|
end else
|
||||||
if GetWindowInfo(LParam)^.hasTabParent then
|
if GetWindowInfo(LParam)^.hasTabParent then
|
||||||
begin
|
begin
|
||||||
// comboboxes send WM_CTLCOLORSTATIC to their parent, but:
|
// need to draw transparently, draw background
|
||||||
// 1) they are opaque, so don't need transparent background
|
GetWin32ControlPos(LParam, Window, P.X, P.Y);
|
||||||
// 2) we will overwrite combobox control, erasing the image!
|
MoveWindowOrgEx(WParam, -P.X, -P.Y);
|
||||||
GetClassName(LParam, winClassName, 10);
|
SendMessage(Window, WM_PAINT, WParam, 0);
|
||||||
if not CompareMem(@winClassName, @ComboboxClsName, High(ComboBoxClsName)+1) then
|
MoveWindowOrgEx(WParam, P.X, P.Y);
|
||||||
begin
|
|
||||||
// need to draw transparently, draw background
|
|
||||||
GetWin32ControlPos(LParam, Window, P.X, P.Y);
|
|
||||||
MoveWindowOrgEx(WParam, -P.X, -P.Y);
|
|
||||||
SendMessage(Window, WM_PAINT, WParam, 0);
|
|
||||||
MoveWindowOrgEx(WParam, P.X, P.Y);
|
|
||||||
end;
|
|
||||||
LMessage.Result := GetStockObject(HOLLOW_BRUSH);
|
LMessage.Result := GetStockObject(HOLLOW_BRUSH);
|
||||||
SetBkMode(WParam, TRANSPARENT);
|
SetBkMode(WParam, TRANSPARENT);
|
||||||
WinProcess := false;
|
WinProcess := false;
|
||||||
@ -1441,6 +1436,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.153 2004/11/03 16:32:54 micha
|
||||||
|
fix drawing of listbox, combobox, edit to be non-transparent even in winxp tabpage (fixes black background upon scroll)
|
||||||
|
|
||||||
Revision 1.152 2004/10/29 18:55:30 micha
|
Revision 1.152 2004/10/29 18:55:30 micha
|
||||||
speed up menu creation
|
speed up menu creation
|
||||||
|
|
||||||
|
@ -433,6 +433,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
|
// listbox is not a transparent control -> no need for parentpainting
|
||||||
|
Params.WindowInfo^.hasTabParent := false;
|
||||||
Result := Params.Window;
|
Result := Params.Window;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -586,6 +588,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
|
// combobox is not a transparent control -> no need for parentpainting
|
||||||
|
Params.WindowInfo^.hasTabParent := false;
|
||||||
// get edit window within
|
// get edit window within
|
||||||
with Params do
|
with Params do
|
||||||
begin
|
begin
|
||||||
@ -761,6 +765,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
|
// edit is not a transparent control -> no need for parentpainting
|
||||||
|
Params.WindowInfo^.hasTabParent := false;
|
||||||
Result := Params.Window;
|
Result := Params.Window;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -870,6 +876,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
|
// memo is not a transparent control -> no need for parentpainting
|
||||||
|
Params.WindowInfo^.hasTabParent := false;
|
||||||
Result := Params.Window;
|
Result := Params.Window;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user