IMathInputControl::SetPreviewHeight method (micaut.h)
Modifies the preview-area height in pixels.
Syntax
HRESULT SetPreviewHeight(
[in] LONG Height
);
Parameters
[in] Height
The preview-area height in pixels.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
The height specified by the Height parameter is outside the control's bounds. |
Remarks
The preview area has predefined minimum and maximum sizes that depend on the current height of the control. If the method returns S_FALSE, the GetPreviewHeight method will return the actual size characteristics of the control.
The following image shows the Math Input Control with the default preview height.
The following image shows the Math Input Control with a custom preview height.Examples
CComPtr<IMathInputControl> g_spMIC; // Math Input Control
// Set the preview height
// Note: Control must be initialized first
void CMath_Input_Control_testDlg::OnBnClickedSetPreviewAreaSize()
{
LONG height = 200;
HRESULT hr = S_OK;
hr = g_spMIC->SetPreviewHeight(height);
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | micaut.h (include Micaut.h) |