New Dialog Styles in Windows 95

Last reviewed: September 29, 1995
Article ID: Q125678
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SUMMARY

Windows 95 provides a few new dialog styles -- all listed in this article. All Windows version 3.1 dialog styles are still usable in Windows 95. However, DS_LOCALEDIT cannot be used in Win32-based applications because it does not apply. Although not documented, DS_ABSALIGN and DS_SETFONT exist in Windows version 3.1. They are documented in Windows 95.

MORE INFORMATION

Here is a list of the new dialog styles:

DS_3DLOOK          Gives the dialog box a nonbold font and draws
                   three-dimensional borders around control windows
                   in the dialog box.

DS_CENTER          Centers the dialog box in the working area -- the
                   area not obscured by the tray.

DS_CENTERMOUSE     Centers the mouse cursor in the dialog box.

DS_CONTEXTHELP     Includes a question mark in the title bar of the
                   dialog box. When the user clicks the question mark,
                   the cursor changes to a question mark with a
                   pointer. If the user then clicks a control in the
                   dialog box, the control receives a WM_HELP message.
                   The control should pass the message to the dialog
                   procedure, which should call the WinHelp function
                   using the HELP_WM_HELP command. The Help
                   application displays a pop-up window that
                   typically contains help for the control. Note that
                   DS_CONTEXTHELP is just a placeholder. When the dialog
                   box is created, the system checks for DS_CONTEXTHELP
                   and, if it is there, adds WS_EX_CONTEXTHELP to the
                   extended style of the dialog box.

DS_CONTROL         Creates a dialog box that works well as a child
                   window of another dialog box, much like a page in
                   a property sheet. This style allows the user to
                   tab among the control windows of a child dialog
                   box, use its accelerator keys, and so on.

DS_FIXEDSYS        Uses SYSTEM_FIXED_FONT instead of SYSTEM_FONT.

DS_NOFAILCREATE    Creates the dialog even if errors occur -- for
                   example, if a child window cannot be created
                   or if the system cannot create a special data
                   segment for an edit control.

DS_SETFOREGROUND   Brings the dialog box to the foreground.
                   Internally, Windows calls the SetForegroundWindow
                   function for the dialog box.


Additional reference words: 4.00 DLGTEMPLATE kbinf
KBCategory: kbui
KBSubcategory: UsrDlgs


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.