Changing the Controls in a Common Dialog Box

Last reviewed: November 2, 1995
Article ID: Q82299
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) versions 3.1
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT version 3.5
    

One reason to incorporate the common dialogs library routines into an application is the ability to use the basic functionality of one or more of the common dialogs and tailor it to the needs of a particular application.

All of the predefined controls must be present for the Common Dialogs DLL (COMMDLG.DLL) to properly interact with a dialog box. Each predefined control in the dialog box must retain its control ID value. For these reasons, an application cannot delete unnecessary controls from a dialog box.

To prevent the user from interacting with a given control, move the control off screen by specifying very large coordinate values [for example, (4000, 4000)]. The application must also disable the control to prevent it from receiving the focus when the user uses the TAB key to cycle through the controls. Failing to disable the control can create "mystery" tab stops where the input focus disappears.


Additional reference words: 3.10 3.50
KBCategory: kbui
KBSubcategory: UsrCmnDlg


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: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.