Dicaste Posted November 17, 2012 Share Posted November 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 17, 2012 Share Posted November 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 17, 2012 Share Posted November 17, 2012 [scar]procedure GetClientDimensions(var cWidth, cHeight: Integer); var c: TSCARClient; begin c := GetClient; c.Update; GetBoxSize(c.ImageArea, cWidth, cHeight); end;[/scar] Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 17, 2012 Share Posted November 17, 2012 What does the Update procedure do exactly? e.g. Client.Update; And why should we call it before all other client functions?..?..? Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 17, 2012 Share Posted November 17, 2012 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;. Quote Link to comment Share on other sites More sharing options...