代码如下:
BOOL CCommonFun::PictureWindows(const CString &strPicFile, CString &sError)
{
CString strSystemDir="";
::GetSystemDirectory(strSystemDir.GetBuffer(256), 256);
strSystemDir.ReleaseBuffer();
CString strRundll = strSystemDir + "\\rundll32.exe";
CString strParm;
strParm.Format("%s//shimgvw.dll imageview_fullscreen %s", strSystemDir, strPicFile);
HINSTANCE hNewExe = ShellExecute(NULL, "Open", strRundll, strParm, NULL, SW_SHOW);
if ((DWORD)hNewExe <= 32)
{
CString sFormat;
sFormat.Format("return value:%d\n", (DWORD)hNewExe);
sError = sFormat;
return FALSE;
}
return TRUE;
}
posted on 2014-03-25 18:40
王海光 阅读(631)
评论(0) 编辑 收藏 引用