ShowPicturizeDlg Example for C++ 5.0 and later

void CDialogs::OnShowPicturizeDlg()
{
	HRESULT hr;
	int nRet;

	ILEADRasterDlgKrn_U *m_pRasterDlgKrn = NULL;
	hr = CoCreateInstance(CLSID_LEADRasterDlgKrn_U,
		NULL,
		CLSCTX_ALL,
		IID_ILEADRasterDlgKrn_U,
		(LPVOID*)&m_pRasterDlgKrn);

	ILEADRasterDlgImgEfx_U *m_pRasterDlgImgEfx = NULL;
	hr = CoCreateInstance(CLSID_LEADRasterDlgImgEfx_U, 
		NULL,
		CLSCTX_ALL,
		IID_ILEADRasterDlgImgEfx_U,
		(LPVOID*)&m_pRasterDlgImgEfx);

	nRet = m_pRasterDlgKrn->InitDlg(INIT_WITH_COLOR);

	m_pRasterDlgImgEfx->BitmapWidth= m_pLead1.GetBitmap();
	m_pRasterDlgImgEfx->BitmapHeight = m_pLead1.GetBitmapHeight();

	nRet = m_pRasterDlgImgEfx->ShowPicturizeDlg((long)m_hWnd); 

	if (nRet == 0 && m_pRasterDlgImgEfx->DialogStatus == DLG_OK) 
	{
		m_pLead1.Picturize(m_pRasterDlgImgEfx->GetDirectoryPath(),
			m_pRasterDlgImgEfx->GetPicturizeResizeFlags(),
			m_pRasterDlgImgEfx->CellWidth, 
			m_pRasterDlgImgEfx->CellHeight); 
	}
}