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. Set my window to wndTopMost. HOWTO?

Set my window to wndTopMost. HOWTO?

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

    My window (CWnd derived) is created by CWnd::CreateEx(WS_EX_TOPMOST,..., WS_POPUP, hwndParent). hwndParent has WS_CHILD style, for it's the only way I could find to create my window without taskbar icon (My wnd is a tooltip-like). I also used: CWnd::SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE); My window couldn't top the taskbar :~ . Very funky... Any ideas why this occurs? Any at all?**

    --BlackSmith--

    **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

    J 1 Reply Last reply
    0
    • B BlackSmith

      My window (CWnd derived) is created by CWnd::CreateEx(WS_EX_TOPMOST,..., WS_POPUP, hwndParent). hwndParent has WS_CHILD style, for it's the only way I could find to create my window without taskbar icon (My wnd is a tooltip-like). I also used: CWnd::SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE); My window couldn't top the taskbar :~ . Very funky... Any ideas why this occurs? Any at all?**

      --BlackSmith--

      **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      In a previous post, I sugested setting the desktop as the parent of your pop-up with Cwnd::SetParent. Didn't this work? (just curious) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      A 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        In a previous post, I sugested setting the desktop as the parent of your pop-up with Cwnd::SetParent. Didn't this work? (just curious) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        use this code ::SetWindowPos (m_hWnd , m_Options_AlwaysOnTop ? HWND_TOPMOST :HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE) ;:-D

        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