HeaderPane
Main
Hide
Share Link
Print

Height Property, SftPictureObject Object

Defines the desired image height.

Syntax

Get

C#int HPix = object.Height;
VB.NETHPix = object.Height As Integer
C++long HPix = object->Height;
long HPix = object->GetHeight();
CHRESULT object->get_Height(long* HPix);

Put

C#int object.Height = HPix;
VB.NETobject.Height = HPix As Integer
C++long object->Height = HPix;
void object->PutHeight(long HPix);
CHRESULT object->put_Height(long HPix);

object

A SftPictureObject object.

HPix

Defines the desired image height.

Comments

The Height property defines the desired image height.

The desired image height is only used for built-in images (SftPictureObject.Type is sftTypeBuiltin) and color samples (SftPictureObject.Type is sftTypeColorSample). For all image types, the SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image dimensions.

Examples

C++ View entire sample code

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();

See Also SftPictureObject Object | Object Hierarchy


Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.