Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-06

SetSysColors

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hello,

If I execute the following at the start of the program:

uses lcltype, lclintf, graphics;
Procedure sc;
Var
   el : Integer;
   col : Integer;
   P1,P2 : PInteger;
begin
   Col:=ColorToRGB(clRed);
   el:=COLOR_WINDOW;
   ;
   ;
   SetSysColors(1,P1,p2);
end;

I would expect that the window color is red, and all windows which have clDefault or clWindow as color become red.

No such thing happened. I tried setting some other colors, but to no avail.

Is this supposed to work ?

Aside from the question whether it is supposed to work, why is the signature of this call using 2 untyped const parameters ?

If I look at
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724940(v=vs.85).aspx it clearly uses (typed) pointers.

Michael.

Reply by email