Jump to content

how to hide taskbars so it doesn't flickering thru gapi


Guest muff

Recommended Posts

Guest muff

an example piece of code to help people out

// to hide taskbar(s) - use after creating the game window or when restoring a minimised app

TaskbarShow( false );

// to allow taskbar(s) to be seen again - use when minimising or exitting the app

TaskbarShow( true );


// this function hides and shows the taskbars on the system
// historically this was here to stop the flickers of the icons on the top taskbar
// that we were getting on the first smartphones
// I'm not 100% sure that it's necessary on newer devices

void TaskbarShow( bool show )
{
RECT rc;
::GetWindowRect(hWnd, &rc );

HWND hWndTB = ::FindWindow(_T("HHTaskbar"), NULL);
if (hWndTB == NULL)
{
hWndTB = ::FindWindow(_T("Tray"), NULL);
}

if (show)
{
::ShowWindow( hWndTB, SW_SHOW );
::SHFullScreen( 0, SHFS_SHOWSTARTICON | SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON);
}
else
{
::SHFullScreen( hWndTB, SHFS_HIDESTARTICON | SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);
::ShowWindow( hWndTB, SW_HIDE );
}
}[/code]

hope that helps

muff

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.