void CShowPicDlg::ShowPic(int nID, CString Path)
{
CStatic* pWnd = (CStatic*)GetDlgItem(nID);
pWnd->ModifyStyle(0,SS_BITMAP);
pWnd->SetBitmap((HBITMAP)::LoadImage(NULL,Path,
IMAGE_BITMAP,
0,
0,
LR_CREATEDIBSECTION | LR_DEFAULTSIZE | LR_LOADFROMFILE));
}
其中,nID是Picture Control的ID,path是图片的路径