Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

GetWindowRect and GetSystemMetrics

I posted an earlier question about screen size, as i tested GetDesktopWindow and getWindowRect i notice that getWindowRect will give me the same width and height as GetSystemMetrics for SM_CXSCREEN and SM_CYSCREEN. So now i am wondering is there a difference between the two APIs ? What i mean is, why would one use one function instead of the other or better when would one would pick one versus the other.
Thanks much.

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [b][red]This message was edited by AsmGuru62 at 2002-10-11 6:48:42[/red][/b][hr]
    : I posted an earlier question about screen size, as i tested GetDesktopWindow and getWindowRect i notice that getWindowRect will give me the same width and height as GetSystemMetrics for SM_CXSCREEN and SM_CYSCREEN. So now i am wondering is there a difference between the two APIs ? What i mean is, why would one use one function instead of the other or better when would one would pick one versus the other.
    : Thanks much.
    :
    [blue]1. Logically, [b]GetSystemMetrics()[/b] should be used, because it talks about the system, [b]GetWindowRect()[/b] on the other hand will work with [b]HWND[/b].

    2. Besides, with [b]GetWindowRect()[/b] you have to call also [b]GetDesktopWindow()[/b] - so you call 2 functions instead of one. It is slower... and more code to write. All programming principles (faster and smaller code) are not in agreement.[/blue]


  • Andre YoungAndre Young USAMember Posts: 0

    _____ || http://forcoder.org || free ebooks and video tutorials about < PL/SQL Objective-C JavaScript MATLAB C# PHP Perl Python Visual Basic .NET Ruby Assembly Delphi Java C++ R Go Swift Scratch C Visual Basic Dart Rust Prolog Crystal SAS COBOL Fortran Erlang Hack Kotlin Awk Ada Scala Scheme Logo ML Lisp F# LabVIEW Alice Transact-SQL Bash VBScript D Clojure ABAP Apex FoxPro Julia Lua /> ______

Sign In or Register to comment.