Share via


Designing Full-Screen Dialog Boxes

4/19/2010

On Windows Mobile devices, you can easily create full-screen top-level windows, with or without title bar icons, as well as full-screen dialog boxes for your application. When designing dialog boxes for your Windows Mobile device application, the following guidelines can help improve the usability of your application:

  • Use simple and natural dialog boxes. Dialog boxes should not contain irrelevant or rarely needed information. Every extraneous unit of information competes with the relevant information and diminishes their relative visibility. All information should appear in a natural and logical order.

  • Speak the user's language. The dialog box should be expressed clearly in words, phrases, and concepts familiar to the user rather than in system-oriented terms.

  • Simplify complicated instructions. The user should not have to remember information from one part of the dialog box to another. Instructions for use of the system should be visible or easily retrievable whenever appropriate.

  • Dialog boxes for should be displayed full screen. By utilizing all available screen space, you can incorporate more functionality within the same window, making it easier for the user to complete a task.

  • Use multiple screens if necessary. To allow sufficient room for all of the dialog box content, you can extend the dialog box over multiple screens.

    Note

    For modal dialogs, the user presses the Up and Down controls to move between dialog box controls.

  • For Windows Mobile Standard, you should not specify WS_POPUP style and a NULL owner when the dialog box is a main window. Otherwise, the dialog box is briefly hidden when the user presses the Home key.

To create a full-screen dialog box, you call the SHInitDialog function during the handling of the WM_INITDIALOG message, as shown in the following example. The SHINITDLGINFO structure sets members for the SHInitDialog function.

On Windows Mobile Standard, you must also override the Back key if the dialog box contains edit controls and you must create soft keys. For information about the Back key, see Navigation Keys. For information about creating soft keys, see How to Create a Soft Key Bar.

Note that beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.

The following code example shows how to use the SHInitDialog function and SHINITDLGINFO structure to create a full-screen dialog box:

case WM_INITDIALOG:
{
    BOOL rb;
    int rc;
    

    sid.dwMask = SHIDIM_FLAGS;  // This is the only allowed value.
    sid.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;  // Make the DB full screen.
    sid.hDlg = hwnd;  // Handle to the dialog box.

    
    if (rb == FALSE)  // SHInitDialog failed.
    {
        rc = MessageBox(NULL, _T(Could not create dialog box.),
                        _T(Error), MB_OK);
        if (rc == 0)  // Not enough memory to create MessageBox.
            return E_OUTOFMEMORY;
        return E_FAIL;  // Replace with specific error handling.
    }
    break;  // From case WM_INITDIALOG.
}

See Also

Tasks

How to Create a Full-Screen Window
How to Enable System-defined File Dialog Boxes
How to Prevent Display of Smart Minimize and OK Buttons in Dialog Boxes

Concepts

How to Call a System-defined Dialog Box
How to Program Scrolling Controls for Dialog Boxes
Navigation Keys

Other Resources

How to Create a Soft Key Bar