面对现实,超越自己
逆水行舟,不进则退
posts - 269,comments - 32,trackbacks - 0
代码如下:
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 王海光 阅读(585) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理