Zyrenthian
Programmer
Hi All,
I am running into a small problem. The product I am working on runs on single as well as dual monitors. On a single monitor system the taskbar behaves as expected.
Here is what the app should do
When it loads, it overlaps the taskbar. The user may access the task bar by pressing the "windows" key. At that time they may click on any of the apps showing in the task bar and bring them to the front.
With dual monitors, however, the taskbar is on top. I figured this would be an easy fix and I thought I had it. Here is what I did:
CWnd* pWnd;
// this gets me the taskbar
pWnd = m_pScreenDialog0->FindWindow("Shell_TrayWnd",0);
// here i adjust the z-order of the taskbar
pWnd->SetWindowPos(&CWnd::wndNoTopMost ,0,0,0,0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
// The flags in SetWindowPos have been tried in all
// possible combinations and still no luck
...
Further down in the code I have 2 CWnd poiters:
m_pScreenDialog0
m_pScreenDialog1
with these I do a SetWindowPos(&CWnd::wndTopMost,...)
The program runs and viola... my app is above the taskbar. The problem comes in when I press the windows key to bring the taskbar back to the front. It appears fine BUT clicking on any of the other apps in the taskbar does nothing. The taskbar just disappears leaving me with my app on top again. It is like the mouse click does not register. However... if I go to Programs->Apps->Something, the taskbar retains it's focus and I can then click on something in it. This is puzzling me and I dont know how to get the taskbar to behave as I want it.
I have also gone the route of using ModifyStlye and ModifyStlyeEx and those seem to produce NO results at all leaving the taskbar above my application.
If anyone has any idea on how to allow the taskbar to retain its functionality when it is no longer the top most window please help!
As for other questions... Always on Top on the taskbar is enabled and I have no way of preventing the end user from making this choice. The above functionality does work with this option selected so I dont think that is the problem.
Thanx for any help/suggestions
matt
I am running into a small problem. The product I am working on runs on single as well as dual monitors. On a single monitor system the taskbar behaves as expected.
Here is what the app should do
When it loads, it overlaps the taskbar. The user may access the task bar by pressing the "windows" key. At that time they may click on any of the apps showing in the task bar and bring them to the front.
With dual monitors, however, the taskbar is on top. I figured this would be an easy fix and I thought I had it. Here is what I did:
CWnd* pWnd;
// this gets me the taskbar
pWnd = m_pScreenDialog0->FindWindow("Shell_TrayWnd",0);
// here i adjust the z-order of the taskbar
pWnd->SetWindowPos(&CWnd::wndNoTopMost ,0,0,0,0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
// The flags in SetWindowPos have been tried in all
// possible combinations and still no luck
...
Further down in the code I have 2 CWnd poiters:
m_pScreenDialog0
m_pScreenDialog1
with these I do a SetWindowPos(&CWnd::wndTopMost,...)
The program runs and viola... my app is above the taskbar. The problem comes in when I press the windows key to bring the taskbar back to the front. It appears fine BUT clicking on any of the other apps in the taskbar does nothing. The taskbar just disappears leaving me with my app on top again. It is like the mouse click does not register. However... if I go to Programs->Apps->Something, the taskbar retains it's focus and I can then click on something in it. This is puzzling me and I dont know how to get the taskbar to behave as I want it.
I have also gone the route of using ModifyStlye and ModifyStlyeEx and those seem to produce NO results at all leaving the taskbar above my application.
If anyone has any idea on how to allow the taskbar to retain its functionality when it is no longer the top most window please help!
As for other questions... Always on Top on the taskbar is enabled and I have no way of preventing the end user from making this choice. The above functionality does work with this option selected so I dont think that is the problem.
Thanx for any help/suggestions
matt