sjesper Posted July 11, 2012 Share Posted July 11, 2012 (edited) [sCAR]procedure GetResolution(out w, h: Integer); var {$IFNDEF SCAR335_UP} HWDC: Integer; {$ENDIF} begin {$IFNDEF SCAR335_UP} HWDC := GetClientWindowHandle; SetDesktopAsClient; GetClientDimensions(w, h); SetClientWindowHandle(HWDC); {$ELSE} GetWindowSize(GetShellWindow, w, h); {$ENDIF} end;[/sCAR] This gets your current resolution. This function will work when 3.35 comes out (Thanks to Freddy ). Edited August 6, 2012 by sjesper Quote Link to comment Share on other sites More sharing options...
FHannes Posted July 11, 2012 Share Posted July 11, 2012 (edited) This will be a lot easier once 3.35 is done EDIT: [scar]procedure GetResolution(out w, h: Integer); var {$IFNDEF SCAR335_UP} HWDC: Integer; {$ENDIF} begin {$IFNDEF SCAR335_UP} HWDC := GetClientWindowHandle; SetDesktopAsClient; GetClientDimensions(w, h); SetClientWindowHandle(HWDC); {$ELSE} GetBoxSize(GetWindowBox(GetShellWnd), w, h); {$ENDIF} end;[/scar] This should do the same thing in the next build of 3.35. Edited July 12, 2012 by Freddy Quote Link to comment Share on other sites More sharing options...
sjesper Posted July 12, 2012 Author Share Posted July 12, 2012 Ahh thanks :-) And yeah it's lot easier to get the size of a not set client instead of you have to activate it, get infos and go back to the old. Great work at 3.35 Quote Link to comment Share on other sites More sharing options...
FHannes Posted July 13, 2012 Share Posted July 13, 2012 Next build will make it even easier [scar]procedure GetResolution(out w, h: Integer); var {$IFNDEF SCAR335_UP} HWDC: Integer; {$ENDIF} begin {$IFNDEF SCAR335_UP} HWDC := GetClientWindowHandle; SetDesktopAsClient; GetClientDimensions(w, h); SetClientWindowHandle(HWDC); {$ELSE} GetWindowSize(GetShellWnd, w, h); {$ENDIF} end;[/scar] Quote Link to comment Share on other sites More sharing options...
sjesper Posted July 13, 2012 Author Share Posted July 13, 2012 Next build will make it even easier [scar]procedure GetResolution(out w, h: Integer); var {$IFNDEF SCAR335_UP} HWDC: Integer; {$ENDIF} begin {$IFNDEF SCAR335_UP} HWDC := GetClientWindowHandle; SetDesktopAsClient; GetClientDimensions(w, h); SetClientWindowHandle(HWDC); {$ELSE} GetWindowSize(GetShellWnd, w, h); {$ENDIF} end;[/scar] This looks great =) I can't believe you made that many new window functions. Great job on the new 3.35 :-) Are you going to make more updates with the functions using this function or is this unknown ? Quote Link to comment Share on other sites More sharing options...
FHannes Posted July 13, 2012 Share Posted July 13, 2012 This looks great =) I can't believe you made that many new window functions. Great job on the new 3.35 :-) Are you going to make more updates with the functions using this function or is this unknown ? I'm still adding more window functions, almost done though I'm not sure I understand the question though... Quote Link to comment Share on other sites More sharing options...
sjesper Posted July 13, 2012 Author Share Posted July 13, 2012 I'm still adding more window functions, almost done though I'm not sure I understand the question though... Ah nice. And you just answered my badly formulated answers =) (Asked if u would change anything else in the window functions) :-) Quote Link to comment Share on other sites More sharing options...