Jump to content
Dicaste

GetClientDimensions

Recommended Posts

Hi;

I can't use "GetClientDimensions" function. Not working anymore.

 

program New;

var
w, h: Integer;

begin
GetClientDimensions(w, h);
end.

Not working. Error Message: "Unknown identifier 'GetClientDimensions' "

 

Is this function deleted or changed ? What i need to use it ?

My version is "SCAR Divi 3.37 RC".

Thanks.

Link to comment
Share on other sites

Here:

 

procedure GetClientDimensions(var cWidth, cHeight: Integer);
var
 wc: TSCARWindowClient;
 b: TBox;
begin
 wc := TSCARWindowClient(GetClient);
 wc.Update;               
 b := wc.ImageArea;       
 cWidth := ((b.X2 - b.X1) + 1);
 cHeight := ((b.Y2 - b.Y1) + 1);                
end;

var
 w, h: Integer;

begin
 ClearDebug;
 GetClientDimensions(w, h);
 WriteLn(IntToStr(w) + 'x' + IntToStr(h));
end.

Link to comment
Share on other sites

What does the Update procedure do exactly? e.g. Client.Update;

 

And why should we call it before all other client functions?..?..?

Updates the client data to current state.

 

Lets say you have a client.. You'll resize it, but SCAR would still use the old data (before resizing), if you don't use Client.Update;.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...