Compartir a través de


CStatic::GetIcon

Obtiene el identificador del icono, establecido previamente con SetIcon, que está asociado a CStatic.

HICON GetIcon( ) const;

Valor devuelto

Un identificador al icono actual, o NULL si no se ha establecido ningún icono.

Ejemplo

CStatic myStatic;

// Create a child icon static control.
myStatic.Create(_T("my static"), 
   WS_CHILD|WS_VISIBLE|SS_ICON|SS_CENTERIMAGE, CRect(10,10,150,50), 
   pParentWnd);

// If no icon is defined for the static control, define the icon  
// to the system error icon. 
if (myStatic.GetIcon() == NULL)
   myStatic.SetIcon(::LoadIcon(NULL, IDI_ERROR));   

Requisitos

encabezado: afxwin.h

Vea también

Referencia

CStatic Class

Gráfico de jerarquías

CStatic::SetIcon

STM_GETICON

Icons