IFMDraw

This interface provides indirect access to the screen device context (DC).

Method
Description
IFMDraw::ClipAndCommit Takes a clipping region and blits that portion of the offscreen bitmap to the screen.
IFMDraw::Commit Blits the entire offscreen bitmap to the screen.
IFMDraw::GetDC Gets a screen device context (DC).
IFMDraw::GetDeviceCaps Gets the capabilities of the screen device context (DC).
IFMDraw::ReleaseDC Releases the device context (DC).

Remarks

The IFMDraw interface extends IDispatch. It is used by controls and forms to manage screen display when simply invalidating and redrawing regions is not sufficient.

A form receives a pointer to an IFMDraw interface when the form is created. A control must request the pointer from its form. The interface provides the control with a device context (DC) that the control can then use to draw to the system’s offscreen bitmap. When drawing is complete, one of two methods is then used to blit the bitmap to the screen.

Drawing to the screen only takes place if a control’s form has focus. If not, the control is not updated. The drawing process proceeds normally—no errors are generated—but the screen is not repainted.