Microsoft KB Archive/65960

INF: Full-Screen, Text-Only PM Dialog Box Sample Program PSS ID Number: Q65960 Article last modified on 09-09-1991 PSS database name: P_PresMan

1.21

OS/2

Summary:

The following information describes how to fill the entire screen with a simple dialog box prior to calling DosShutDown. This functionality is similar to the behavior exhibited when the Shutdown option from the Desktop Manager is selected. When this option is selected, the entire screen is erased and the final message is displayed as a simple dialog box.

An application can load in a dialog box and change its size and position at WM_INITDLG time. The individual dialog item’s size and position can also be changed at this time. This is a useful feature because it is possible to figure out the size of the screen the application is running on and set the size of the dialog box to that of the screen. Moreover, the dialog box items can be centered.

The WinQuerySysValue, WinQueryWindowPos, and WinSetWindowPos functions can be used to implement this type of functionality.

In the Software/Data Library is a file named FSDLGR that contains a sample application that brings up a dialog box with a predefined size (in the .RC file). If the “load dialog” item is selected, it will bring up the full-screen version of the dialog box. The essential code is in the WM_INITDLG case of the DlgProc call.

FSDLGR can be found in the Software/Data Library by searching on the word FSDLGR, the Q number of this article, or S12715. FSDLGR was archived using the PKware file-compression utility.

Copyright Microsoft Corporation 1991.