Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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_POPUPstyle and a
NULLowner 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 SHInitDialogfunction during the handling of the WM_INITDIALOGmessage, as shown in the following example. The SHINITDLGINFOstructure sets members for the SHInitDialogfunction.
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 SHInitDialogfunction and SHINITDLGINFOstructure to create a full-screen dialog box:
Copy Code | |
---|---|
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 WindowHow 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 BoxHow to Program Scrolling Controls for Dialog Boxes
Navigation Keys