Is it possible to...
make a window...
1. that cannot be moved
2. has no border, no title bar, nothing but one label (visible)
3. that can always remain on top of the taskbar, but no other window can (unless specifically programmed to)
reason: i want to streamline the look of my desktop. i've done pretty well so far, but at the sacrifice of my clock. for some reason i truely can't stand it in the system tray. there's a nice little blank grey rectangle directly under my start menu which is the perfect size for a clock. (i "pulled" my taskbar up a notch)...i want to put a clock there. can i make this happen or what?
Yes, broadly speaking, it's possible to create that sort of window and use it in that fashion, the only problem is that you'd need to track what's going on with the taskbar in order to react to move/size events.
Also there's the little issue that the taskbar is an AppBar. This means that the taskbar window is "registered" to occupy that area of the screen. Other windows cannot normally occupy the same area. I'm not sure whether Windows'll let you move a window into an AppBar area, never tested it myself, but it's something to bear in mind if doesn't seem to wanna go there.
So yeah, you can do it, but you'd be jumping through a hell of a lotta hoops to keep it "in place" with the taskbar... ;)
If you don't have your taskbar to "always on top" I'm sure any TOP_MOST window could easily draw over it.
thanks for the tips (escpecially TOP_MOST)...
i'm not worried about resizing and what not..just hard coding it in will suffice because this program is soley for my use and i do not plan on changing my taskbar's dimensions (<-- famous last words)...hell, i might even do void WinMain() :P
Well you say "I don't want to resize or anything" but... Perhaps you will want to be using GetDeviceCaps() with HORZRES and VERTRES so you don't hard-code in your screen resolution. There are times, especially when updating video drivers, where your resolution may change. You wouldn't want your program to look all screwy, and god forbid, make it hard to operate within your desktop, when such things happen. I think you will find the task bar to be a chore to deal with no matter what you do though...But keep in mind if you take the HDC of your desktop, you can easily draw right over anything on your screen, taskbar included.