I prefer set Taskbar to hide, but still want show clock all the time. I make a small clock (80x41px) lay at bottom-right corner of screen. I make it Topmost [edit: with Timer]:
SetWindowPos(hwnd, HWND_TOPMOST, r.right - width, r.bottom - height, 0, 0, SWP_NOSIZE);
// r is my window's rect
When I click to TaskBar, my clock still on top of it. But when I play some fullscreen game it hide my clock. May be they use a special method.
My question is there is any way to show my window on top of every top-most window, even active top-most window? I don't need my app get keyboard or mouse input, just lay there to display time.
I know my question is quite specific as I write this clock for myself. I searched google but don't find any web pages can solve this (this question ask the same, but it want to get mouse event, and the answer say no, but I hope a window that doesn't need input maybe a special case).
Any help would be appreciated!
Edit
Incase impossible, How about draw a rectangle on top of screen? As I don't need get input, this maybe a replace solution. Is that possible?
It's not very elegant, but I've solved this before by constantly setting the window to HWND_TOPMOST
on a one-second timer.