Click to See Complete Forum and Search --> : taskbar
cobra_poland
May 30th, 2004, 10:57 AM
Hi!
I would like to implement a basic windows taskbar. But as I am just starting to program in windows, I'm having a bit of a problem.
How can I make my window stay docked at the bottom of the screen, while the desktop workarea is set in such a way that every other window will ont overlap it?
Best Regards
cobra
NoHero
May 31st, 2004, 12:25 PM
Ok:
* You retrieve a WM_MOVE message, just set the window position back to the bottom of the desktop. ;) Plain and simple. Another thing would be: Make your window without any toolbar, so you user cant move it by clicking the client area of the window.
* Use "SetWindowPos" with the flag "SWP_TOPMOST", so your window will always be at the top.
Regards NoHero
cobra_poland
June 1st, 2004, 08:11 AM
;] I dont understand :(
I am doing something like this at the beggining:
HWND hwnd;
hwnd = FindWindow("Shell_TrayWnd","");
ShowWindow(hwnd, SW_SHOW);
hwnd = FindWindow("Progman", "Program Manager");
ShowWindow(hwnd, SW_SHOW);
LPRECT lprect;
SystemParametersInfo(SPI_GETWORKAREA,0, lprect, 0);
lprect->bottom = Screen->DesktopHeight;
SystemParametersInfo(SPI_SETWORKAREA,0, lprect, 0);
I'm hiding the windows taskbar and desktop icons, then i'm expanding the workspace to maximum.
My window is made without any toolbars, without any borders. I want it to stay at the bottom of the screen, regardless of the workarea setting. When I set the workspace "bottom" higher my window moves up, but I don't want this to happen, I want it to stay there no matter what happens.
Any ideas ?
btw, i'm using borland c++ builder (i'm a little short on time, so I can't make a winapi-only application)
Thanks
Best Regards
NoHero
June 1st, 2004, 10:16 AM
Hu ... I have never used the C Builder ... I just can give you the tipp:
// hwnd supposed to be your window
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
this makes your window stay on top ...
Regards NoHero
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.