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. Keeping a dialog on top

Keeping a dialog on top

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorial
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
    Tony Fontenot
    wrote on last edited by
    #1

    Boy I feel dumb today. I know I have seen an article on here that tells me how to keep a dialog as the top window, but I can't seem to find it through the search engin or my manual search. If someone could be so kind and point me to a good arctile I would be very grateful. Here's to bad days. *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************

    T J 2 Replies Last reply
    0
    • T Tony Fontenot

      Boy I feel dumb today. I know I have seen an article on here that tells me how to keep a dialog as the top window, but I can't seem to find it through the search engin or my manual search. If someone could be so kind and point me to a good arctile I would be very grateful. Here's to bad days. *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Check this...

      ::SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);

      ... or, if you're MFC type, this:

      dlg.SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);

      Tomasz Sowinski -- http://www.shooltz.com

      - It's for protection
      - Protection from what? Zee Germans?

      T 1 Reply Last reply
      0
      • T Tony Fontenot

        Boy I feel dumb today. I know I have seen an article on here that tells me how to keep a dialog as the top window, but I can't seem to find it through the search engin or my manual search. If someone could be so kind and point me to a good arctile I would be very grateful. Here's to bad days. *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #3

        ::SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);

        Jeremy Falcon Imputek "..." - Paul Watson  07-17

        1 Reply Last reply
        0
        • T Tomasz Sowinski

          Check this...

          ::SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);

          ... or, if you're MFC type, this:

          dlg.SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);

          Tomasz Sowinski -- http://www.shooltz.com

          - It's for protection
          - Protection from what? Zee Germans?

          T Offline
          T Offline
          Tony Fontenot
          wrote on last edited by
          #4

          you da man!!:cool: Thank you much, that did it, now I have to do some positioning and I should be good. Thanks again. *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************

          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