ShowDotRemoveDlg Example for C++ 5.0 and later
void CDialogs::OnShowDotRemoveDlg() { 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->DotRemove->MinDotWidth = 6; m_pRasterDlgImgDoc->DotRemove->MinDotHeight = 6; m_pRasterDlgImgDoc->DotRemove->MaxDotWidth = 8; m_pRasterDlgImgDoc->DotRemove->MaxDotHeight = 8; m_pRasterDlgImgDoc->DotRemove->Flags = DOT_USE_DIAGONALS | DOT_USE_DPI; m_pRasterDlgImgDoc->PutWhiteAreaColor(RGB(255, 0, 0)); m_pRasterDlgImgDoc->PutBlackAreaColor(RGB(0, 0, 255)); m_pRasterDlgImgDoc->UIFlags = DOTREMOVE_AUTOPROCESS ; DOTREMOVE_SHOW_PREVIEW | DOTREMOVE_SHOW_TOOL_ZOOMLEVEL; m_pRasterDlgImgDoc->Bitmap = m_pLead1.GetBitmap(); nRet = m_pRasterDlgImgDoc->ShowDotRemoveDlg((long)m_hWnd); if (nRet == 0 && m_pRasterDlgImgDoc->DialogStatus == DLG_OK) { m_pLead1.DotRemove(m_pRasterDlgImgDoc->DotRemove->Flags, m_pRasterDlgImgDoc->DotRemove->MinDotHeight, m_pRasterDlgImgDoc->DotRemove->MinDotHeight, m_pRasterDlgImgDoc->DotRemove->MaxDotWidth, m_pRasterDlgImgDoc->DotRemove->MaxDotHeight); } }