Platform SDK: DirectX

ID3DXContext::Resize

The ID3DXContext::Resize method changes the dimensions of buffers encapsulated by a context object.

HRESULT Resize( 
  DWORD width,
  DWORD height
);

Parameters

width
The new width of the buffers.
height
The new height of the buffers.

Return Values

If the method succeeds, the return value is S_OK.

If the method fails, the return value may be one of the following values:

D3DXERR_CANNOTRESIZEFULLSCREEN
D3DXERR_INVALIDPARAMETER
DDERR_GENERIC
DDERR_INCOMPATIBLEPRIMARY
DDERR_INVALIDCAPS
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDPIXELFORMAT
DDERR_INVALIDSURFACETYPE
DDERR_NOALPHAHW
DDERR_NOCOOPERATIVELEVELSET
DDERR_NODIRECTDRAWHW
DDERR_NOEMULATION
DDERR_NOEXCLUSIVEMODE
DDERR_NOFLIPHW
DDERR_NOMIPMAPHW
DDERR_NOOVERLAYHW
DDERR_NOPALETTEATTACHED
DDERR_NOPALETTEHW
DDERR_NOT8BITCOLOR
DDERR_NOZBUFFERHW
DDERR_OUTOFMEMORY
DDERR_OUTOFVIDEOMEMORY
DDERR_PRIMARYSURFACEALREADYEXISTS
DDERR_SURFACELOST
DDERR_UNSUPPORTED
DDERR_UNSUPPORTEDMODE

Remarks

Note that reference counts are maintained for the buffers encapsulated by a context object. So, it is the application's responsibility to release the buffers before the application exits or when it is resized.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.

See Also

ID3DXContext::GetBufferSize