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. General Programming
  3. C / C++ / MFC
  4. How to let the windows show top most?

How to let the windows show top most?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 Posters 0 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.
  • Y Offline
    Y Offline
    yu jian
    wrote on last edited by
    #1

    It needs to let the current process create a copy of process and then exit current process. I try to use the SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE) to set windows topmost, when first showup. So I kill the process in the taskmgr.exe and it will notify process to show a modal dialog to let user click, when click and then current process will create new process of itself and then exit current process. So a new process will showup, but I am amazing that why the topmost window is the taskmgr. But if I click the shortcut of this application, and it will show on the topmost. I donot know where is the difference between these ways.

    A 1 Reply Last reply
    0
    • Y yu jian

      It needs to let the current process create a copy of process and then exit current process. I try to use the SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE) to set windows topmost, when first showup. So I kill the process in the taskmgr.exe and it will notify process to show a modal dialog to let user click, when click and then current process will create new process of itself and then exit current process. So a new process will showup, but I am amazing that why the topmost window is the taskmgr. But if I click the shortcut of this application, and it will show on the topmost. I donot know where is the difference between these ways.

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      Your question doesn't really make sense (maybe because English is not your first language)... what are you trying to accomplish? Try to elaborate on what it is you're trying to have the user experience. SetWindowPos() simply shifts the window at that time, not forever.

      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