Window Z-Order and Taskbar

Quick question here.

Have a pop-up window that I have animate into the screen.  I wish to set the Z-Order of this window to be just below the task bar.  As in, it will be above all other windows except the taskbar.  This is to simulate the window popping up from below the tasbar instead of the edge of the screen.

The problem with SetWindowPos is that is 'inserts after' so even IF i knew how to get the task bar window pointer, it would still place my window above the taskbar.

Another issue that might arise is that when a fullscreen app or game is running, I do not want my window trying to force itself to draw above the fullscreen app.  Thus producing a flicker in the fullscreen app and possibly introduce a fight for user input control.
LVL 4
r2farAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mahesh1402Commented:
If you want to create a window that is drawn in front of the taskbar instead of behind it then you may try creating window with WS_EX_TOPMOST extended window style.

MAHESH
0
r2farAuthor Commented:
Thank you for your response mahesh,

However I wish the window to appear to pop-up from BEHIND the window.  At current it already pops up in front of it as I have been using the TOPMOST flag.
0
r2farAuthor Commented:
CORRECTION:  I wish the window to appear to pop-up from BEHIND the >>TASKBAR<<
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

mahesh1402Commented:
>>CORRECTION:  I wish the window to appear to pop-up from BEHIND the >>TASKBAR<<

Just be clear : You want window to appear behind taskbar or front of taskbar ? As its now behind taskbar and if you want it in front of taskbar that is TOP to taskbar just make it WS_EX_TOPMOST extended window style.

MAHESH
0
r2farAuthor Commented:
As stated in my original question.  I want it above all other windows, except the taskbar.  I do not want the window animating onto the screen in a manner that covers up the clock and system tray icons.
0
mahesh1402Commented:
>>I want it above all other windows, except the taskbar.

Instead of this you may just Make your window top most  using SetWindowPos(&CWnd::wndTop,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE) and then maintain your bottom position of window such that it will not just cover taskbar. You may do this by trapping WM_MOVE message. Add handler for this OnMove() and in this function you may check position of your window while moving ..if its just about to overlap use MoveWindow() or SetWindowPost() to set it to above taskbar forcefully.

MAHESH
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
r2farAuthor Commented:
Thank You,

But perhaps i should explain my intent.  The window 'animates' from off-screen onto the screen.  It is designed to relay information from a running service.  The window will not be movable, it will just animate onto the screen at the same corner as the tasbar clock, then animate out after either a time elapse or user input (this is working).  It is just a matter of estetics to have it not cover up the clock and system tray icons as it does this animation.  Its final position is just above the taskbar, its only during the animation that it covers the taskbar.  Animating from 'under' the tasbar is also requested behavior as another element of the program is a system tray icon that changes when the service sends communications to this application.

If i use the 'wndTop' flag, my window will get pushed behind the other windows when it loses focus.  I still want the window to appear above the other, non-taskbar, windows even after losing focus.  I 'have' been using SetWindowPos with the 'wndTopMost' flag which produce the desired effect EXCEPT it also covers the taskbar.

But the concept you mentioned, about snapping the window to the taskbar, might be useful in the future *wink
0
r2farAuthor Commented:
Well I have determined a solution on my own.

It involves both, moving the window with SetWindowPos(), as well as modifying the the windows region to 'squish' against the taskbar.  The results being that the region prohibits the window drawing anything beyond the taskbar edge even though the window itself is moving.  I can tell you it was 'fun' setting up the equations for all this as my code also handles the taskbar being in various positions on the desktop.

I will award points as your answers have some mild relavence.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.