Available in the LEADTOOLS Imaging toolkit. |
ShowStitchDlg Example for C++ 5.0 and later
void CDialogs::OnShowStitchDlg() { 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->ItemsCount = 3; m_pRasterDlgImgEfx->PutItemFileName(0, "D:\\Images\\Vista\\Dock.jpg"); m_pRasterDlgImgEfx->PutItemFileName(1, "D:\\Images\\Vista\\Creek.jpg"); m_pRasterDlgImgEfx->PutItemFileName(2, "D:\\Images\\Vista\\Forest.jpg"); for (int i = 0; i < 3; i++) { m_pLead1.Load(m_pRasterDlgImgEfx->GetItemFileName(i), 0, 0, 1); m_pRasterDlgImgEfx->PutItemDescription(i, m_pRasterDlgImgEfx->GetItemFileName(i)); m_pRasterDlgImgEfx->PutItemBitmap(i, m_pLead1.GetBitmap()); } m_pRasterDlgImgEfx->StitchBitmapWidth = 320; m_pRasterDlgImgEfx->StitchBitmapHeight = 200; m_pRasterDlgImgEfx->StitchBitsPerPixel = 24; m_pRasterDlgImgEfx->StitchResolution = 72; m_pRasterDlgImgEfx->PutStitchBackGroundColor(RGB(255, 255, 255)); nRet = m_pRasterDlgImgEfx->ShowStitchDlg((long)m_hWnd); if (nRet == 0 && m_pRasterDlgImgEfx->DialogStatus == DLG_OK) { m_pLead1.SetBitmap(m_pRasterDlgImgEfx->StitchBitmap); } }