SHINITDLGINFO (Windows CE 5.0)
This structure sets members for the SHInitDialog function.
Syntax
typedef struct tagSHINITDIALOG { DWORD dwMask; HWND hDlg; DWORD dwFlags;} SHINITDLGINFO, *PSHINITDLGINFO;
Members
dwMask
Bitfield indicating which members of the SHINITDLGINFO structure are valid. Possible values are:#define SHIDIM_FLAGS 0x0001
hDlg
Handle to the dialog box. This member is required.dwFlags
Flags indicating what action to take. Ignored unless SHIDIM_FLAGS is set. The following table shows the possible values for this member.Flag Description SHIDIF_DONEBUTTON Puts the OK button on the menu bar or on a caption. Note This flag is supported only for a Windows Mobile-based Pocket PC.SHIDIF_EMPTYMENU Creates an empty menu bar on the dialog. Note This flag is supported only for a Windows Mobile-based Pocket PC.SHIDIF_FULLSCREENNOMENUBAR Sizes the dialog box to full screen. Does not leave room at the bottom for a menu bar. SHIDIF_SIPDOWN Puts the input panel down. Note This flag is supported only for a Windows Mobile-based Pocket PC.SHIDIF_SIZEDLG On devices with QVGA displays, this action has the same behavior as on a Windows Mobile-based Pocket PC. The dialog box is resized based on the current position of the software input panel. On devices with full displays, the dialog box is moved out of the way of the software input panel.
SHIDIF_SIZEDLGFULLSCREEN Sizes the dialog box to full screen, regardless of the position of the input panel. SHIDIF_CANCELBUTTON Adds the Cancel [x] button to close the dialog with IDCANCEL, ignoring changes. Note This flag is supported only for a Windows Mobile-based Pocket PC.SHIDIF_WANTSCROLLBAR Adds a scroll bar on the dialog, if the dialog does not fit on the screen. Note This flag is supported only for a Windows Mobile-based Pocket PC.
Code Example
The following code example demonstrates how to use SHINITDLGINFO with dwFlags set to SHIDIF_CANCELBUTTON. Note that this code example is applicable to a Windows Mobile-based Pocket PC.
Note To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
BOOL CALLBACK DlgProc(HWND hdlg, UINT msg, WPARAM wp, LPARAM lp)
{
SHINITDLGINFO shidi;
switch (msg)
{
case WM_INITDIALOG:
shidi.dwMask = SHIDIM_FLAGS;
shidi.hDlg = hdlg;
shidi.dwFlags = SHIDIF_CANCELBUTTON | SHIDIF_SIZEDLG;
SHInitDialog(&shidi);
return TRUE;
case WM_COMMAND:
if (LOWORD(wp) == IDCANCEL)
{
// The user pressed Cancel.
EndDialog(hdlg, IDCANCEL);
}
return TRUE;
}
return FALSE;
}
Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: aygshell.h
Library: aygshell.lib
Send Feedback on this topic to the authors