Windows 7 - SHAppBarMessage under windows7
Asked By 4N
28-Dec-09 01:05 PM
Hi,
I have lately tried an application of mine under windows 7and I found out that
I cannot remove the attribute ABS_ALWAYSONTOP to the taskbar.
How can I make a fullscreen application like WMP then?
Thanks in advance for any help.
Visual Studio 2005
(1)
Windows 7
(1)
SHAppBarMessage
(1)
GetWindowLongPtr
(1)
SetWindowLongPtr
(1)
WndExStyleBak
(1)
GetDesktopWindow
(1)
GetClientRect
(1)
Jim Barry replied to 4N
If you resize your application window so that it fills the whole screen
then Windows will make sure it appears above the taskbar.
- Jim
4N replied to Jim Barry
I tried:
SetWindowPos(Handle, HWND_TOP, 0, 0,1680, 1050,
SWP_FRAMECHANGED|SWP_DRAWFRAME);
ShowWindow(Handle,SW_SHOW);
and using the handle of the taskbar as well
HWND hWnd = FindWindow(TEXT("Shell_TrayWnd"), NULL);
SetWindowPos(Handle, hWnd,...);
The window keeps resizing down to an height of 1020
Jim Barry replied to 4N
Make sure that the window does not have the WS_THICKFRAME style.
- Jim
4N replied to Jim Barry
Not working, sorry. Code:
g_WndStyleBak = GetWindowLongPtr(Handle,GWL_STYLE);
g_WndExStyleBak = GetWindowLongPtr(Handle,GWL_EXSTYLE);
SetWindowLongPtr(Handle,GWL_STYLE,g_WndStyleBak&(~(WS_DLGFRAME|WS_BORDER|WS_THICKFRAME)));
if(SetWindowLongPtr(Handle,GWL_EXSTYLE,WS_MAXIMIZE)==0) GetLastError(); //
with or without this line it is the same: not working
SetWindowPos(Handle, HWND_TOP,...);
ShowWindow(Handle,SW_SHOW);
Jim Barry replied to 4N
Well, I tried it with a fixed-size dialog and also with a normal frame
window with the WS_THICKFRAME style removed, and it worked fine in both
cases.
Using Visual Studio 2005, I created a new project of type "MFC
Application" keeping all the default settings. In MainFrm.cpp, at the
end of CMainFrame::OnCreate (just before the return statement), I added
the following code:
CRect r;
GetDesktopWindow()->GetClientRect(&r);
ModifyStyle(WS_THICKFRAME, 0);
MoveWindow(&r);
Works fine for me. Does it work for you?
- Jim
Timo Kunze replied to 4N
4N schrieb:
WS_MAXIMIZE is not an extended window style.
Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
??berzeugung, dass die demokratischen Kr??fte ??berwiegen und sich ??? auf
demokratischem Wege ??? durchsetzen."
4N replied to Jim Barry
Using visual studio and mfc your example does work, so now I have to find
out why it does not work under c++ builder 2010.
Thanks a lot for your support.
4N replied to Timo Kunze
you are right, my bad.
Thanks for pointing it out.
Troubleshooting Long Boot Time? Windows 7 Just re-imaged my PC last nite. The image was not from that long ago boot time has gone completely down the tubes. I am getting 1:25 to the Windows Desktop, but at that point there is no connectivity to my NAS box. TeamViewer, OTOH trial-and-error removal of everything optional startup that I can think of? - - Pete Cresswell Windows XP Discussions WINDOWS system32 (1) Office (1) Vista (1) Adobe (1) Backup (1) Disk (1) Bit (1) XP know what: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = XPBA 1.0 21.1.2012 20:11:21.276 = = = ProcessId -1 C: \ WINDOWS \ system32 \ ntkrnlpa.exe 21.01.2012 20:09:19.703 0 ms { C: \ WINDOWS \ system32 \ ntkrnlpa.exe 21.01.2012 20:09:19.703 C: \ WINDOWS \ system32 \ hal.dll 21.01.2012 20:09:19.703 C: \ WINDOWS \ system32 \ KDCOM.DLL
Why do you still use Windows XP? Windows 7 Give your reasons. Do you plan to upgrade ever? If so, when and why? If you use both XP and 7, do you ever plan on ditching XP for good? What will you do when support point where this OS will be problematic with new hardware? Personally I am waiting for Windows 8 to release a second service pack. XP sucked when it first came out until did not work, it had to enabled then disabled to be disabled for real. Sigh. . . Windows XP Discussions Windows XP (1) Windows Embedded (1) Windows Server (1) Microsoft Word (1) Windows Media (1) PowerPoint (1) Smart Card
Will w8 have xp downgrade rights? Windows 7 Hi Guys, Has anyone heard any rumors on weather or not M$ will continue with its XP downgrade rights when Windows 8 comes out? -T Windows XP Discussions Windows XP (1) Windows Server (1) Windows Vista (1) Windows 7 (1) Office (1) Linux (1) Vista (1) Money (1) XP is on its death
Will Old XP Applications Run on Windows7? Windows 7 Following multiple crashes, I have had a terrible time trying to rebuild my XP system Mode" would help, or is this dreaming? Thank you very much for your thoughts, David Windows XP Discussions Windows Virtual PC (1) Virtual PC (1) Windows XP (1) Microsoft Project (1) Visual Studio (1) Office 2003 (1) Windows 7 (1) Office (1) On 16 Sep 2011, David <invalid@socrates.edu> wrote in microsoft
New harddisks don't boot when old harddisks are disconnected. Windows 7 Hello, I have discovered a very serious issue with my DreamPC from 2006 (updated along help / work which indicates a more serious issue. I suspect the problem is with how Windows 7 installed itself and how it arranged the boot program. I suspect the boot program is on an old harddisk instead of the new one. Windows 7 was installed on the new harddisk, but I suspect Windows 7 did not install the boot program on the new harddisk, which would be a pretty