ShowBorderRemoveDlg Example for C++ 5.0 and later
void CDialogs::OnShowRemoveRedEyeDlg() { HRESULT hr; int nRet; ILEADRasterDlgKrn_U *m_pRasterDlgKrn = NULL; hr = CoCreateInstance(CLSID_LEADRasterDlgKrn_U, NULL, CLSCTX_ALL, IID_ILEADRasterDlgKrn_U, (LPVOID*)&m_pRasterDlgKrn); ILEADRasterDlgImgDoc_U *m_pRasterDlgImgDoc = NULL; hr = CoCreateInstance(CLSID_LEADRasterDlgImgDoc_U, NULL, CLSCTX_ALL, IID_ILEADRasterDlgImgDoc_U, (LPVOID*)&m_pRasterDlgImgDoc); nRet = m_pRasterDlgKrn->InitDlg(INIT_WITH_COLOR); m_pRasterDlgImgDoc->Bitmap = m_pLead1.GetBitmap(); m_pRasterDlgImgDoc->BorderRemove->WhiteNoiseLength = 3; m_pRasterDlgImgDoc->BorderRemove->BorderPercent = 5; m_pRasterDlgImgDoc->BorderRemove->Variance = 2; m_pRasterDlgImgDoc->BorderRemove->BorderToRemove = BORDER_LEFT; m_pRasterDlgImgDoc->BorderRemove->Flags = BORDER_USE_VARIANCE; nRet = m_pRasterDlgImgDoc->ShowBorderRemoveDlg((long)m_hWnd); if (nRet == 0 && m_pRasterDlgImgDoc->DialogStatus == DLG_OK) { m_pLead1.BorderRemove(m_pRasterDlgImgDoc->BorderRemove->Flags, m_pRasterDlgImgDoc->BorderRemove->BorderToRemove, m_pRasterDlgImgDoc->BorderRemove->BorderPercent, m_pRasterDlgImgDoc->BorderRemove->WhiteNoiseLength, m_pRasterDlgImgDoc->BorderRemove->Variance); } }