Are you using MFC?
The problem is SIP state is per dialog, not per application. So you need to show/hide it inside every dialog independently.
void CAaa::OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized )
{
if(nState == WA_ACTIVE || nState == WA_CLICKACTIVE)
{
SHINITDLGINFO shidi;
shidi.dwMask = SHIDIM_FLAGS;
shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR|SHIDIF_SIPDOWN | SHFS_HIDETASKBAR;
shidi.hDlg = m_hWnd;
SHInitDialog(&shidi);
SHFullScreen(m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON |SHFS_HIDESTARTICON);
}
}
And you should remove any Fullscreen or taskbar keys if not needed :)
And the other thing to use:
SHSipPreference(m_hWnd,SIP_UP); // SIP_DOWN
Or even:
HWND hwndCB = ::FindWindow(_T("SipWndClass"),_T(""));
::ShowWindow( hwndCB, SW_SHOW);
hwndCB = ::FindWindow(_T("MS_SIPBUTTON"),NULL);
::ShowWindow( hwndCB, SW_SHOW);
But the latter could be not so standard :) Still it works.
Try them.