Announcement

Collapse
No announcement yet.

Multiple monitors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple monitors

    I'm restoring an app on launch to it's previous state and all is well except if the application is maximized on a secondary display where upon restoring it maximizes on the default display, how do I determine what screen the app is on to restore properly?

  • #2
    Originally posted by Shrek View Post
    I'm restoring an app on launch to it's previous state and all is well except if the application is maximized on a secondary display where upon restoring it maximizes on the default display, how do I determine what screen the app is on to restore properly?
    You could store the X and Y coordinates of the window as well as the window state. Let's say you have two 1024px wide monitors, if your application is being shown on monitor two, the X position is greater than 1024 if the monitors are set up horizontally.
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

    Comment


    • #3
      take a look at these two functions ,and let the OS do it for you
      GetWindowPlacement
      SetWindowPlacement
      amsplugins.com Is Closed.

      Facebook Page

      Comment


      • #4
        ^^ thanks guys :yes

        Comment

        Working...
        X