MFFrameCreateFromHBITMAP Method (MFramesClass)
bitmap handle object
result frame
additional properties
Creates a frame from a HBitmap object
Syntax
Public Overridable Sub MFFrameCreateFromHBITMAP( _
   ByVal _hBitmap As Long, _
   ByRef _ppFrame As IMFFrame, _
   ByVal _bsPropsList As String _
) 
public virtual void MFFrameCreateFromHBITMAP( 
   long _hBitmap,
   out IMFFrame _ppFrame,
   string _bsPropsList
)
public procedure MFFrameCreateFromHBITMAP( 
    _hBitmap: Int64;
   Out  _ppFrame: IMFFrame;
    _bsPropsList: String
); virtual; 
public: virtual void MFFrameCreateFromHBITMAP( 
   long _hBitmap,
   [PARAMFLAG::Out] IMFFrame* _ppFrame,
   BSTR* _bsPropsList
) 

Parameters

_hBitmap
bitmap handle object
_ppFrame
result frame
_bsPropsList
additional properties
Example

Here is an example of how to create a frame from HBitmap and sent it to a preview:

m_objPreview = new MFPreviewClass();
//Configure preview
m_objPreview.PreviewWindowSet("", panelPreview.Handle.ToInt32());
m_objPreview.PreviewEnable("", 1, 1);
MFFactoryClass factory = new MFFactoryClass();
MFFrame frame;
factory.MFFrameCreateFromFile(h_bitmap, out frame, "");
m_objPreview.ReceiverFramePut(frame, -1, "");
See Also

Reference

MFramesClass Class
MFramesClass Members