Class IOffScreenBuf

3DS Max Plug-In SDK

Class IOffScreenBuf

See Also: Custom Controls.

class IOffScreenBuf

Description:

This control provides an off screen buffer which the developer may draw into, then quickly blit onto the actual display for flicker free image updates.

To initialize the pointer to the control call:

Function:

IOffScreenBuf *CreateIOffScreenBuf(HWND hCtrl);

To release the control call:

Function:

DestroyIOffScreenBuf(IOffScreenBuf *iBuf);

Methods:

Prototype:

virtual HDC GetDC()=0;

Remarks:

Returns a handle to the display device context (DC) for the off screen buffer. The display device context can be used in subsequent GDI functions to draw in the buffer.

Prototype:

virtual void Erase(Rect *rct=NULL)=0;

Remarks:

This method is used to erase the buffer.

Parameters:

Rect *rct=NULL

Specifies the rectangular region to erase. If NULL the entire buffer is erased.

Prototype:

virtual void Blit(Rect *rct=NULL)=0;

Remarks:

This method blits (transfers the image from) the buffer to the display.

Parameters:

Rect *rct=NULL

Specifies the rectangular region to blit. If NULL the entire buffer is blitted.

Prototype:

virtual void Resize()=0;

Remarks:

This method is used to resize the buffer.

Prototype:

virtual void SetBkColor(COLORREF color)=0;

Remarks:

This sets the buffer to the specified color.

Parameters:

COLORREF color

The color to set. You may use the RGB macro to set the color.

Prototype:

virtual COLORREF GetBkColor()=0;

Remarks:

This methods retrieves the background color of the buffer.

Return Value:

The background color of the buffer.