Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CButton::SetElevationRequired

Sets the state of the current button control to elevation required, which is necessary for the control to display an elevated security icon.

BOOL SetElevationRequired(
      BOOL fElevationRequired
);

Parameter

Description

[in] fElevationRequired

true to set elevation required state; otherwise, false.

true if this method is successful; otherwise, false.

If a button or command link control requires elevated security permission to perform an action, set the control to elevation required state. Subsequently, Windows displays the User Account Control (UAC) shield icon on the control. For more information, see "User Account Control" at MSDN.

This method sends the BCM_SETSHIELD message, which is described in the Windows SDK.

Header: afxwin.h

This method is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

Community Additions

ADD
Show:
© 2015 Microsoft