Partager via


CMFCImageEditorDialog::CMFCImageEditorDialog

Constructs a CMFCImageEditorDialog object.

CMFCImageEditorDialog(
   CBitmap* pBitmap,
   CWnd* pParent=NULL,
   int nBitsPixel=-1 
);

Parameters

  • pBitmap
    Pointer to an image.

  • pParent
    Pointer to the parent window of the current image editor dialog box.

  • nBitsPixel
    The number of bits used to represent the color of a single pixel, which is also referred to as color depth. If the nBitsPixel parameter is -1, the color depth is derived from the image specified by the pBitmap parameter. The default value is -1.

Return Value

To modify an image, pass an image pointer to the CMFCImageEditorDialog constructor. Then call the DoModal method to open a modal dialog box. When the DoModal method returns, the bitmap contains the new image.

Example

The following example demonstrates how to construct an object of the CMFCImageEditorDialog class. This example is part of the New Controls sample.

// CBitmap m_bmpImage
    HBITMAP hBmpCopy = (HBITMAP) ::CopyImage(m_bmpImage.GetSafeHandle(), IMAGE_BITMAP, 0, 0, 0);


...


        // this points to Page3 class which extends the CMFCPropertyPage class
        CMFCImageEditorDialog dlg(CBitmap::FromHandle(hBmpCopy), this);

Requirements

Header: afximageeditordialog.h

See Also

Reference

CMFCImageEditorDialog Class

Hierarchy Chart