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:

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
	BOOL rb;
	int rc;

	sid.dwMask = SHIDIM_FLAGS;  // This is the only allowed value.
	sid.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;  // Make the DB full
	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