Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 2.27 KB

File metadata and controls

36 lines (28 loc) · 2.27 KB
title Toolbar Button Properties (C++) | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.technology
cpp-windows
ms.topic conceptual
dev_langs
C++
helpviewer_keywords
size, toolbar buttons
toolbar buttons [C++], setting properties
Toolbar editor [C++], toolbar button properties
status bars [C++], active toolbar button text
command IDs, toolbar buttons
width, toolbar buttons
ms.assetid b2705814-7c5d-4f24-8f77-07559b0cdda2
author mikeblome
ms.author mblome
ms.workload
cplusplus
uwp

Toolbar Button Properties (C++)

The properties of a toolbar button are:

Property Description
ID Defines the ID for the button. The drop-down list provides common ID names.
Width Sets the width of the button. 16 pixels is recommended.
Height Sets the height of the button. Note that the height of one button changes the height of all buttons on the toolbar. 15 pixels is recommended.
Prompt Defines the message displayed in the status bar. Adding \n and a name adds a ToolTip to that toolbar button. For more information, see Creating a ToolTip.

Width and Height apply to all buttons. A bitmap that is used to create a toolbar has a maximum width of 2048. So if you set the button width to 512, you can only have four buttons and if you set the width to 513, you can only have three buttons.

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

MFC or ATL

See Also

Changing the Properties of a Toolbar Button
Toolbar Editor