Search This Blog

Thursday, September 17, 2009

Change or Hide Start button name windows XP



void ChangeOrHideStartButton()
{
HWND hSysTrayWnd = ::FindWindow( "Shell_TrayWnd", 0 );
if( hSysTrayWnd )
{
// Get the start button
HWND hStartBtn = ::FindWindowEx( hSysTrayWnd, 0, "Button", "Start" );
if( hStartBtn )
{
// Hide the start button if shown or show if hidden
if( ::IsWindowVisible( hStartBtn ))
{
::ShowWindow( hStartBtn, SW_HIDE );
}
else
{
::ShowWindow( hStartBtn, SW_SHOW );
//To change name
::SetWindowText(hStartBtn,"Your Name");
}
}

}
}

No comments: