- 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;
- }
MFC使用windows图片查看器
最新推荐文章于 2021-10-05 22:31:05 发布