Is it possible to...

This is a discussion on Is it possible to... within the Windows Programming forums, part of the Platform Specific Boards category; make a window... 1. that cannot be moved 2. has no border, no title bar, nothing but one label (visible) ...

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    719

    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?
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,262
    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...

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    If you don't have your taskbar to "always on top" I'm sure any TOP_MOST window could easily draw over it.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    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
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    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.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21