SHINITDLGINFO (Windows CE 5.0)

Windows CE 5.0
Send Feedback

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.
FlagDescription
SHIDIF_DONEBUTTONPuts 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_EMPTYMENUCreates an empty menu bar on the dialog.
Note   This flag is supported only for a Windows Mobile-based Pocket PC.
SHIDIF_FULLSCREENNOMENUBARSizes the dialog box to full screen. Does not leave room at the bottom for a menu bar.
SHIDIF_SIPDOWNPuts the input panel down.
Note   This flag is supported only for a Windows Mobile-based Pocket PC.
SHIDIF_SIZEDLGOn 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_SIZEDLGFULLSCREENSizes the dialog box to full screen, regardless of the position of the input panel.
SHIDIF_CANCELBUTTONAdds 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_WANTSCROLLBARAdds 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

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: