Available in the LEADTOOLS Imaging toolkit. |
ShowAddFrameDlg Example for C++ 6.0 and later
void CDialogd::OnShowAddFrame()
{
int nRet;
m_pRasterImageDlg->ItemsCount= 3;
m_pRasterImageDlg->PutItemFileName(0,"C:\\1.bmp");
m_pRasterImageDlg->PutItemFileName(1,"C:\\2.bmp");
m_pRasterImageDlg->PutItemFileName(2,"C:\\3.bmp");
for (int i= 0; i < m_pRasterImageDlg->ItemsCount; i ++ )
{
m_Lead1.Load (m_pRasterImageDlg->GetItemFileName (i),0,0,1);
m_pRasterImageDlg->PutItemDescription (i,m_pRasterImageDlg->GetItemFileName(i));
m_pRasterImageDlg->PutItemBitmap (i, m_Lead1.GetBitmap ());
}
m_pRasterImageDlg->PutBitmap (m_Lead1.GetBitmap ());
m_pRasterImageDlg->PutUIFlags (ADDFRAME_SHOW_PREVIEW |
ADDFRAME_SHOW_TOOL_ZOOMLEVEL);
nRet = m_pRasterImageDlg->ShowAddFrameDlg((long)this->m_hWnd);
if ( nRet == 0 && m_pRasterImageDlg->DialogStatus == DLG_OK )
{
m_Lead2.SetBitmap(m_pRasterImageDlg->SelectedBitmap);
nRet = m_Lead1.AddFrame ( m_Lead2.GetBitmap(),
m_pRasterImageDlg->EnableKeepFrameState,
m_pRasterImageDlg->EnableUseMask,
m_pRasterImageDlg->MaskColor,
m_pRasterImageDlg->SmoothEdge,
(AddFrameLocationConstants)m_pRasterImageDlg->Location,
m_pRasterImageDlg->GetQuality()
);
}
}