ShellExecute (0, "open", "explorer.exe", "G:\\t.bmp", "", 10);//在win7上没问题,但是windows xp系统不可;
所以,用一下函数可以全部支持(简单修改了一下别人的文章):
void Palyimagewindows( CString strPicFile )
{
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);
ShellExecute(NULL, "Open", strRundll, strParm, NULL, SW_SHOW);
}