Re:help with win API functions
Try this:
procedure TForm1.FormCreate(Sender: TObject);
var
i:Ticonmetrics;
n:Tnonclientmetrics;
begin
i.cbSize:=sizeof(i);
n.cbSize:=sizeof(n);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,0,@n,0);
SystemParametersInfo(SPI_GETICONMETRICS,0,@i,0);
Label1.Caption:=IntToStr(i.iHorzSpacing-GetSystemMetrics(SM_CXICON));
Label2.Caption:=i.lfFont.lfFaceName+' '+IntToStr(i.lfFont.lfHeight*-1);;
Label3.Caption:=IntToStr(i.iVertSpacing-GetSystemMetrics(SM_CXICON));
Label4.Caption:=IntToStr(n.iBorderWidth);
Label5.Caption:=n.lfCaptionFont.lfFaceName+'
'+IntToStr(n.lfCaptionFont.lfHeight*-1);
end;
Why GetSystemMetrics?- in the answer the iconwidth itself are included.
Why @n, @i?-you need the pointer.
-----------------------------
J?rgen
Shay Kalev skrev i meddelandet <345C8540.7355...@ventura.co.il>...
Quote
>Can anyone tell how to use the ICONMETRICS and NONCLIENTMETRICS structs
>to retrive the iconmetrics and nonclientmetrics
>(i know i'm suppose to use recrods but its not working so good.)
>--
>please remember:
>/***************************\
>A .44 magnum beats four aces
>\***************************/
>Shay "Sanitarium" Kalev
>http://sanitarium.info.co.il
>s...@ventura.co.il