SHFullScreen (Windows Embedded CE 6.0)
1/6/2010
This function can be used to take over certain areas of the screen. It is used to modify the taskbar, Input Panel button, or Start menu icon.
Syntax
BOOL SHFullScreen(
HWND hwndRequester,
DWORD dwState
);
Parameters
- hwndRequester
[in] Handle to the top-level window requesting the full-screen state. If you are using one of the SHFS_HIDE* flags, this window must be the foreground window or the function will fail.
dwState
[in] Specifies the state of the window. The following table shows the possible values for this parameter.State Description SHFS_SHOWTASKBAR
Return the taskbar to its topmost state.
SHFS_HIDETASKBAR
Put the taskbar at the bottom of the z-order. Note that a game or an application that requires the entire screen may use this flag. Be sure that your application is sized to full screen before using this flag. Otherwise, it will appear as though the function did nothing.
Return Value
This function returns TRUE if it is successful and FALSE if it fails.
Code Example
The following code example demonstrates how to use SHFullScreen.
Note
To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
#include <aygshell.h>
LRESULT CALLBACK SHFullScreenWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static fFullScreen = FALSE;
switch (message)
{
case WM_KEYDOWN:
{
// Toggle between full screen and normal mode when the user presses the space bar.
if (VK_SPACE == wParam)
{
DWORD dwState;
RECT rc;
if (fFullScreen)
{
// To switch to normal mode, first show all of the shell parts.
dwState = (SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
SHFullScreen(hwnd, dwState);
// Next resize the main window to the size of the work area.
SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, FALSE);
MoveWindow(hwnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
fFullScreen = !fFullScreen;
}
else
{
// To switch to full screen mode, first hide all of the shell parts.
dwState = (SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
SHFullScreen(hwnd, dwState);
// Next resize the main window to the size of the screen.
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
MoveWindow(hwnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
fFullScreen = !fFullScreen;
}
}
}
break;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
Requirements
Header | shellsdk.h |
Library | aygshell.lib |
Windows Embedded CE | Windows CE 3.0 and later |