Defines the desired image height.
Get
| C# | int HPix = object.Height; |
| VB.NET | HPix = object.Height As Integer |
| C++ | long HPix = object->Height; long HPix = object->GetHeight(); |
| C | HRESULT object->get_Height(long* HPix); |
Put
| C# | int object.Height = HPix; |
| VB.NET | object.Height = HPix As Integer |
| C++ | long object->Height = HPix; void object->PutHeight(long HPix); |
| C | HRESULT object->put_Height(long HPix); |
object
HPix
Defines the desired image height.
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.
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