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. Help with creating Always On Top hidden window

Help with creating Always On Top hidden window

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

    Hello, Could anyone please show me how to create an Always On Top window like ICQ or Task Manager except it is transparent? I want the window to be Topmost and no application being maximized can stay above it. I am creating my window like this, but it is not always on top. Please help, tell, or show me what to do, thank you. // Create the window (this doesn't work, I don't know why) // If I do a Alt-Tab, other windows being maximized can still go above it hwndHotkey = CreateWindowEx(WS_EX_TRANSPARENT | WS_EX_TOPMOST, szWindowNameHotkey, NULL, WS_POPUP, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), NULL, NULL, ghInstance, NULL); SetWindowPos(hwndHotkey, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); :)

    V 1 Reply Last reply
    0
    • J JavaTony

      Hello, Could anyone please show me how to create an Always On Top window like ICQ or Task Manager except it is transparent? I want the window to be Topmost and no application being maximized can stay above it. I am creating my window like this, but it is not always on top. Please help, tell, or show me what to do, thank you. // Create the window (this doesn't work, I don't know why) // If I do a Alt-Tab, other windows being maximized can still go above it hwndHotkey = CreateWindowEx(WS_EX_TRANSPARENT | WS_EX_TOPMOST, szWindowNameHotkey, NULL, WS_POPUP, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), NULL, NULL, ghInstance, NULL); SetWindowPos(hwndHotkey, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); :)

      V Offline
      V Offline
      Vitaliy Hubanov
      wrote on last edited by
      #2

      Try to write: SetWindowPos(&wndTopMost, ... ); When I use (for example) SetWindowPos(&wndTopMost,1,1,200,200,SWP_SHOWWINDOW ); my dialog window is always on top. Best regards, Vitaliy

      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