OnSetSize method

Sets the width and height of the surface.

Syntax

HRESULT retVal = object.OnSetSize(Width, Height);

Parameters

  • Width [in]
    Type: unsigned long

    New width of the surface, in pixels.

  • Height [in]
    Type: unsigned long

    New height of the surface, in pixels.

Remarks

The derived class can override this virtual function to perform necessary computations when the size of the surface changes. The base class will only call this function from the IDXSurfaceInit::InitSurface method. You can call it from other interfaces you implement (for example, IDXTScaleOutput). The default implementation stores the width and height in the m_Width and m_Height data members of CDXBaseSurface, and calls CDXBaseNTo1::SetDirty to increment the generation ID.

See also

Reference

CDXBaseNTo1::SetDirty

IDXSurfaceInit::InitSurface

IDXTScaleOutput