Sign in to follow this  
Followers 0
muff

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

1 post in this topic

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

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.