SHINITDLGINFO
A version of this page is also available for
4/8/2010
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_FULLSCREENNOMENUBAR
Sizes the dialog box to full screen. Does not leave room at the bottom for a menu bar.
SHIDIF_SIZEDLG
On devices with QVGA displays, this action has the same behavior as on Windows Mobile Professional and Windows Mobile Classic. 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_DONEBUTTON
Puts the OK button on the menu bar or on a caption.
> [!NOTE] > This flag is supported only for Windows Mobile Professional and Windows Mobile Classic.SHIDIF_EMPTYMENU
Creates an empty menu bar on the dialog.
> [!NOTE] > This flag is supported only for Windows Mobile Professional and Windows Mobile Classic.SHIDIF_SIPDOWN
Puts the input panel down.
> [!NOTE] > This flag is supported only for Windows Mobile Professional and Windows Mobile Classic.SHIDIF_CANCELBUTTON
Adds the Cancel [x] button to close the dialog with IDCANCEL, ignoring changes.
> [!NOTE] > This flag is supported only for Windows Mobile Professional and Windows Mobile Classic.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 Windows Mobile Professional and Windows Mobile Classic.
Code Example
The following code example demonstrates how to use SHINITDLGINFO with dwFlags set to SHIDIF_CANCELBUTTON. Note that this code example is applicable only to Windows Mobile Professional and Windows Mobile Classic.
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
Header | aygshell.h |
Library | aygshell.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Pocket PC 2000 and later, Smartphone 2002 and later |