How To Create Full-Screen Applications for the PocketPC
This article was previously published under Q266244 SUMMARY
The documentation clearly describes how to use the SHFullScreen API in a non-Microsoft Foundation Class (MFC) Win32 application to create full-screen windows on the PocketPC. However, the documentation does not describe the same procedure for MFC-based applications. This article describes how to make full-screened applications for the PocketPC by using either the Win32 API or MFC.
MORE INFORMATION
For applications that target Windows CE, it has become popular to use as much of the screen of the smaller Palm-sized devices as possible. The new user interface (UI) of the PocketPC platform requires additional work for an application to use the entire screen area. To understand the comments in the code examples in the article, the new PocketPC UI terms are described:
NOTE: To make dialog boxes full-screen, if the dialog box has any controls with the WS_TABSTOP style set, SHFullScreen will not hide the SIP button. If you notice that the SIP button unexpectedly cannot be hidden, see the dialog box resources in the resource editor and view the properties dialog box for each of the controls. Verify that the Tab Stop check box is not selected for all controls. For a plain Win32 application that uses the CreateWindow or CreateWindowEx function for its main UI, call SHFullScreen to hide the imposing UI elements to enable complete full-screen coverage, call the ShowWindow function to hide the application's command bar, and then adjust the window's size by using the MoveWindow function. The sample code below illustrates this method. This code has been adapted from the SHAPI Win32 Pocket PC SDK sample. NOTE: If you want to restore the original size of the application, use SHFS_SHOWTASKBAR and SHFS_SHOWSIPBUTTON. However, MoveWindow is called with the bottom parameter decreased by two times the MENU_HEIGHT. For example:
For a Win32 application dialog box, the SHInitDialog function is used in the handler for WM_INITDIALOG. SHInitDialog is used in conjunction with the SHFullScreen function to hide the UI elements and achieve a full-screen dialog box:
The following discusses how to perform similar tasks from within MFC applications. There are two main types of MFC applications for Windows CE, dialog-based and SDI or Document/View support applications. To accomplish what the SHAPI Win32 sample demonstrates, you must access data members of MFC classes.The following illustrates the process for a Document/View type of application. This code is for a command handler that will put the application in full-screen mode:
If a dialog box is to be displayed to cover the entire screen, similar code is placed in the OnInitDialog handler. One difference is that the MFC framework for PocketPC creates an empty command bar in CDialog that must be hidden:
APPLIES TO
| Article Translations
| ||||||||||||||||||||||||||
Back to the top
