Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Window position?

Window position?

Scheduled Pinned Locked Moved System Admin
tutorialquestion
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rickard Andersson20
    wrote on last edited by
    #1

    I wan to get the position of the window? I use SetWindowPos(..) to set my app on top of all other apps. But I want to get the window's current positon on the desktop to assign the values in the function to stay where it was before! HOW? Show me code example! I know this is to easy but you can show me dude! :) :) :) :rose: :rose: :rose: :rose: :rose: :rose: ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------

    E G 2 Replies Last reply
    0
    • R Rickard Andersson20

      I wan to get the position of the window? I use SetWindowPos(..) to set my app on top of all other apps. But I want to get the window's current positon on the desktop to assign the values in the function to stay where it was before! HOW? Show me code example! I know this is to easy but you can show me dude! :) :) :) :rose: :rose: :rose: :rose: :rose: :rose: ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------

      E Offline
      E Offline
      Ernest Laurentin
      wrote on last edited by
      #2

      If you want to place a window top most just call SetWindowPos like this:

      SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);

      Did I understand you right or I missed something?

      1 Reply Last reply
      0
      • R Rickard Andersson20

        I wan to get the position of the window? I use SetWindowPos(..) to set my app on top of all other apps. But I want to get the window's current positon on the desktop to assign the values in the function to stay where it was before! HOW? Show me code example! I know this is to easy but you can show me dude! :) :) :) :rose: :rose: :rose: :rose: :rose: :rose: ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------

        G Offline
        G Offline
        Gavin Taylor
        wrote on last edited by
        #3

        Have u tried : BOOL GetWindowRect( HWND hWnd, // handle to window LPRECT lpRect // window coordinates );

        Gavin Taylor w: http://www.gavintaylor.co.uk

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups