Skip to content

Latest commit

 

History

History
69 lines (56 loc) · 2.91 KB

File metadata and controls

69 lines (56 loc) · 2.91 KB
title Adding a Control to a Dialog Box | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
f1_keywords
vc.editors.dialog.dialog
dev_langs
C++
helpviewer_keywords
dialog boxes, adding controls to
dialog box controls, adding to dialog boxes
controls [C++], adding to dialog boxes
ms.assetid b2a26d19-093f-49ca-93da-fef00dfbb381
caps.latest.revision 11
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
ru-ru
zh-cn
zh-tw
translation.priority.mt
cs-cz
pl-pl
pt-br
tr-tr

Adding a Control to a Dialog Box

To add a control to a dialog box

  1. Ensure that the dialog box tabbed window is the current document in the editor frame. If a dialog is not the current document, you won't see the Dialog Editor Tab in the Toolbox.

  2. On the Dialog Editor Tab of the Toolbox Window, select the control you want, then:

    • Click the dialog box at the location where you want to place the control. The control appears where you've clicked. For information, see Adding Multiple Controls.

      - or -

    • Drag and drop the control from the Toolbox window to the location on your dialog box. For more information, see Sizing a Control While You Add It.

      - or -

    • Double-click the control in the Toolbox window (it appears on your dialog box) then reposition the control to the location you prefer.

For information about the types of controls available on the Toolbox window, see Dialog Editor Tab, Toolbox Window.

For information on adding resources to managed projects, please see Resources in Desktop Apps in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see Creating Resource Files for Desktop Apps. For information on globalization and localization of resources in managed apps, see Globalizing and Localizing .NET Framework Applications.

Requirements

Win32

See Also

Controls in Dialog Boxes
Adding Event Handlers for Dialog Box Controls
Dialog Box Controls and Variable Types