SHInitDialog (Windows CE 5.0)
This function resizes a dialog box to accommodate a software input panel based on parameters specified in a SHINITDLGINFO structure.
**Note **For a Windows Mobile-based Pocket PC, this function is primarily used to create a full-screen dialog box with the OK button in the navigation bar. The user interface for Windows Mobile-based Pocket PCs 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
- pshidi
[in] Pointer to a SHINITDLGINFO structure.
Return Values
This function returns TRUE if it is successful and FALSE if it fails.
Remarks
Smartphone does not support the SHIDIF_DONEBUTTON flag. If SHIDIF_DONEBUTTON is specified in a Pocket PC application, 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.
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 Remarks
For a Windows Mobile-based device this function is defined in the Aygshell.h header file.
Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: shellsdk.h
Library: aygshell.lib
See Also
CreateDialog | DialogBox | SHINITDLGINFO
Send Feedback on this topic to the authors