Sunday, January 17, 2016

How not to enter the program when the dialog button to display the full-screen method




            


RECT rc;
GetWindowRect (hDlg, & amp; rc);
SHFullScreen (hDlg, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON | SHFS_HIDESTARTICON);
MoveWindow (hDlg, rc.left, rc.top, rc.right, rc.bottom, TRUE);

Full screen, but also shows the input button? How close?
Reply:
The reply is deleted moderator

Reply:
I would like to know, ah, how to get it, I used vc ++. Net
Reply:
Found.
#include & lt; aygshell.h & gt;

LRESULT CALLBACK SHFullScreenWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static fFullScreen = FALSE;

switch (message)
{
case WM_KEYDOWN:
{
// When the user presses the space key, toggle between full screen and normal mode.
if (VK_SPACE == wParam)
{
DWORD dwState;
RECT rc;

if (fFullScreen)
{
// To get into normal mode, first show all of the shell parts.
dwState = (SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
SHFullScreen (hwnd, dwState);

// Then resize the main window to be the size of the work area.
SystemParametersInfo (SPI_GETWORKAREA, 0, & amp; rc, FALSE);
MoveWindow (hwnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);

! fFullScreen = fFullScreen;
}
else
{
// To get info 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 be the size of the screen.
SetRect (& amp; 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);
}

No comments:

Post a Comment