Have a Pocket PC screen that makes the calls:

SHINITDLGINFO shDlgInfo;
SHMENUBARINFO shMenuBarInfo;

// menu bar should be empted while dialog is up
memset(&shMenuBarInfo, 0, sizeof(shMenuBarInfo));
shMenuBarInfo.cbSize = sizeof(shMenuBarInfo);
shMenuBarInfo.hwndParent = hWnd;
shMenuBarInfo.dwFlags = SHCMBF_EMPTYBAR;
shMenuBarInfo.hInstRes = NULL;
shMenuBarInfo.nBmpId = 0;
shMenuBarInfo.cBmpImages = 0;
shMenuBarInfo.nToolBarId = 0;

SHCreateMenuBar(&shMenuBarInfo);

shDlgInfo.hDlg = hWnd;
shDlgInfo.dwMask = SHIDIM_FLAGS;
shDlgInfo.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;

SHInitDialog(&shDlgInfo);
SHFullScreen(hWnd, SHFS_SHOWTASKBAR|SHFS_SHOWSIPBUTTON);

When the dialog box comes up, the keyboard is displayed but the SIP button
that is found in the lower right corner of the menu bar is NOT there.

Any thought on why?

Re: SIP button Missing from menu bar by r_z_aret

r_z_aret
Thu Jan 12 15:26:19 CST 2006

On Wed, 11 Jan 2006 16:31:03 -0800, Go Cougs!
<GoCougs@discussions.microsoft.com> wrote:

>Have a Pocket PC screen that makes the calls:
>
> SHINITDLGINFO shDlgInfo;
> SHMENUBARINFO shMenuBarInfo;
>
> // menu bar should be empted while dialog is up
> memset(&shMenuBarInfo, 0, sizeof(shMenuBarInfo));
> shMenuBarInfo.cbSize = sizeof(shMenuBarInfo);
> shMenuBarInfo.hwndParent = hWnd;
> shMenuBarInfo.dwFlags = SHCMBF_EMPTYBAR;
> shMenuBarInfo.hInstRes = NULL;
> shMenuBarInfo.nBmpId = 0;
> shMenuBarInfo.cBmpImages = 0;
> shMenuBarInfo.nToolBarId = 0;
>
> SHCreateMenuBar(&shMenuBarInfo);
>
> shDlgInfo.hDlg = hWnd;
> shDlgInfo.dwMask = SHIDIM_FLAGS;
> shDlgInfo.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
>
> SHInitDialog(&shDlgInfo);
> SHFullScreen(hWnd, SHFS_SHOWTASKBAR|SHFS_SHOWSIPBUTTON);
>
>When the dialog box comes up, the keyboard is displayed but the SIP button
>that is found in the lower right corner of the menu bar is NOT there.
>
>Any thought on why?

Many of the details of the SIP button and task bar remain a mystery to
me. As a hack/workaround, you might try hiding and showing the button
directly. This function works for me:


//
--------------------------------------------------------------------
// PFCSipButtonShow
void PFCSipButtonShow( BOOL bShow )
{
HWND hWnd = ::FindWindow( _T( "MS_SIPBUTTON" ), NULL );
if (hWnd == NULL)
return;

if (bShow)
::ShowWindow( hWnd, SW_SHOW );
else
::ShowWindow( hWnd, SW_HIDE );

} // PFCSipButtonShow

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com