Export (0) Print
Expand All

SHInitDialog

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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

Aa932176.note(en-us,MSDN.10).gifNote:
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.


BOOL SHInitDialog(
  PSHINITDLGINFO pshidi
);

pshidi

[in] Pointer to a SHINITDLGINFO structure.

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

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.

Headershellsdk.h
Libraryaygshell.lib
Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2000 and later, Smartphone 2002 and later

Community Additions

ADD
Show:
© 2014 Microsoft