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. Dialog Always On Top

Dialog Always On Top

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • T Offline
    T Offline
    tjkrz
    wrote on last edited by
    #1

    Here's the situation: I have a program that runs in the system tray, and I want to be able to open a Dialog that sits on top and has focus over all programs currently running (kind of like a system message from Windows). Since DoModal does not accomplish this, is there something else I can do? Thanks. Todd

    V S 2 Replies Last reply
    0
    • T tjkrz

      Here's the situation: I have a program that runs in the system tray, and I want to be able to open a Dialog that sits on top and has focus over all programs currently running (kind of like a system message from Windows). Since DoModal does not accomplish this, is there something else I can do? Thanks. Todd

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to override the event handler for ON_KILLFOCUS. Call SetFocus(). Kuphryn

      1 Reply Last reply
      0
      • T tjkrz

        Here's the situation: I have a program that runs in the system tray, and I want to be able to open a Dialog that sits on top and has focus over all programs currently running (kind of like a system message from Windows). Since DoModal does not accomplish this, is there something else I can do? Thanks. Todd

        S Offline
        S Offline
        Scott H Settlemier
        wrote on last edited by
        #3

        Did you really mean the focus? (where keyboard input is sent) Or are you looking to make the window topmost, activated and prevent activation of other windows until yours is dismissed? (handling WM_ACTIVATEAPP and using AttachThreadInput and SetForegroundWindow to reassume the foreground if the user tries to switch to another window. ick )

        T 1 Reply Last reply
        0
        • S Scott H Settlemier

          Did you really mean the focus? (where keyboard input is sent) Or are you looking to make the window topmost, activated and prevent activation of other windows until yours is dismissed? (handling WM_ACTIVATEAPP and using AttachThreadInput and SetForegroundWindow to reassume the foreground if the user tries to switch to another window. ick )

          T Offline
          T Offline
          tjkrz
          wrote on last edited by
          #4

          Yes, I am looking to make the window topmost, activated and prevent activation of other windows until mine is dismissed. I didn't mean keyboard focus. Sorry.

          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