CaptureEXE Example for C++ 5.0 and later
m_pRasterScr1.PutTransparentColor(RGB(255,255,255));
/*capture by string resource id*/
m_pRasterScr1.CaptureEXE("c:\\windows\\calc.exe", SCR_CAP_ICON, "sc", FALSE, FALSE);
m_LEADRasterView1.GetRaster().SetBitmap(m_pRasterScr1.GetBitmap ());
AfxMessageBox(TEXT("Wait"));
/*now, capture by numeric resource id*/
m_pRasterScr1.CaptureEXE("c:\\windows\\defrag.exe", SCR_CAP_ICON, "111", TRUE, FALSE);
m_LEADRasterView1.GetRaster().SetBitmap(m_pRasterScr1.GetBitmap());
AfxMessageBox(TEXT("Wait"));
/*finally, capture by resource index*/
m_pRasterScr1.CaptureEXE("c:\\windows\\calc.exe", SCR_CAP_ICON, "0", -1, -1);
m_LEADRasterView1.GetRaster().SetBitmap(m_pRasterScr1.GetBitmap ());
AfxMessageBox(TEXT("Wait"));