Compartilhar via


SHInitDialog

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function resizes a dialog box to accommodate a software input panel based on parameters specified in a SHINITDLGINFO structure.

Note

For Windows Mobile Standard, this function is primarily used to create a full-screen dialog box with the OK button in the navigation bar. The Windows Mobile Standard user interface uses many full-screen dialog boxes. Because the navigation bar has been moved to the top of the screen, the Done button has been visually removed from full-screen dialog boxes and replaced with an OK button in the navigation bar.

Syntax

BOOL SHInitDialog(
  PSHINITDLGINFO pshidi
);

Parameters

Return Value

This function returns TRUE if it is successful and FALSE if it fails.

Remarks

The following code example shows how to use the SHInitDialog function.

SHINITDLGINFO shidi;
BOOL bSuccessInit;
case WM_INITDIALOG:
  // Create a Done button and size it.
  shidi.dwMask = SHIDIM_FLAGS;
  shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
  shidi.hDlg = hDlg;
  SHInitDialog(&shidi);
  bSuccessInit = SHInitDialog(&shidi);
  break;

Windows Mobile Standard does not support the SHIDIF_DONEBUTTON flag. If SHIDIF_DONEBUTTON is specified in an application for Windows Mobile Professional or Windows Mobile Classic, then SHInitDialog places the OK button on the caption for the dialog box. If a dialog box does not already have a caption, then SHInitDialog adds one. If SHIDIF_DONEBUTTON is specified and a dialog box has a Close button, SHInitDialog does not remove the Close button and adds an OK button.

For a Windows Mobile device this function is defined in the Aygshell.h header file.

Requirements

Header shellsdk.h
Library aygshell.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Reference

CreateDialog
DialogBox
SHINITDLGINFO