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 make the window always topmost?

How to make the window always topmost?

Scheduled Pinned Locked Moved C / C++ / MFC
questionadobetutorial
4 Posts 3 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.
  • F Offline
    F Offline
    fantasy1215
    wrote on last edited by
    #1

    Please notice My question is : How to make the window ALWAYS topmost? I make a window, and set it fullscreen, and use ::SetWindowPos to set it topmost style window. But accident happens. 1、when a balloon tooltip shows(like the xp autoupdate prompt that you've downloaded all the updates, you can install it or firewall prompt), the balloon tooltip then runs before my topmost window. 2、When I insert a usb flash disk, because my xp allows autorun, then the autorun window also comes before my topmost window. So is it possible, when the situations above happens, I can still make my window topmost(don't let any prompt comes before my window)? Please give me some hints!

    B M 2 Replies Last reply
    0
    • F fantasy1215

      Please notice My question is : How to make the window ALWAYS topmost? I make a window, and set it fullscreen, and use ::SetWindowPos to set it topmost style window. But accident happens. 1、when a balloon tooltip shows(like the xp autoupdate prompt that you've downloaded all the updates, you can install it or firewall prompt), the balloon tooltip then runs before my topmost window. 2、When I insert a usb flash disk, because my xp allows autorun, then the autorun window also comes before my topmost window. So is it possible, when the situations above happens, I can still make my window topmost(don't let any prompt comes before my window)? Please give me some hints!

      B Offline
      B Offline
      Baltoro
      wrote on last edited by
      #2

      There is an article about that, right here at CodeProject. Makes Any Windows Always on Top[^]. Source Code is provided.

      F 1 Reply Last reply
      0
      • B Baltoro

        There is an article about that, right here at CodeProject. Makes Any Windows Always on Top[^]. Source Code is provided.

        F Offline
        F Offline
        fantasy1215
        wrote on last edited by
        #3

        Thanks first. I will finger out whether it is what i needed.

        1 Reply Last reply
        0
        • F fantasy1215

          Please notice My question is : How to make the window ALWAYS topmost? I make a window, and set it fullscreen, and use ::SetWindowPos to set it topmost style window. But accident happens. 1、when a balloon tooltip shows(like the xp autoupdate prompt that you've downloaded all the updates, you can install it or firewall prompt), the balloon tooltip then runs before my topmost window. 2、When I insert a usb flash disk, because my xp allows autorun, then the autorun window also comes before my topmost window. So is it possible, when the situations above happens, I can still make my window topmost(don't let any prompt comes before my window)? Please give me some hints!

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          You can't, short of doing something like using DirectX in exclusive mode. There's nothing from stopping another program from making its window topmost after you make yours topmost.

          --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

          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