|
楼主 |
发表于 2012-7-13 09:09:44
|
显示全部楼层
LRESULT CIC3DConnectorTestDlg::OnGridItemDblclick(WPARAM wParam,LPARAM lParam)
{
CBCGPGridItem* pGridItem = (CBCGPGridItem*)lParam;
HRESULT hr = E_FAIL;
ASSERT(pGridItem);
CBCGPGridRow* pRow = pGridItem->GetParentRow();
ASSERT(pRow);
CConvertResult* pResult = reinterpret_cast<CConvertResult*>(pRow->GetData());
STARTUPINFO Info;
PROCESS_INFORMATION ProcInfo;
memset(&ProcInfo, 0, sizeof(PROCESS_INFORMATION));
memset(&Info, 0, sizeof(STARTUPINFO));
Info.cb = sizeof(Info);
CString strApp = L"C:\\Program Files\\CAXA\\CAXA ICS VIEWER\\2011\\bin\\ICViewer.exe";
TCHAR short_path[MAX_PATH] = {0};
GetShortPathName(strApp, short_path,MAX_PATH);
strApp = short_path;
CString strFilepath = pResult->m_strHSFFilePath;
TCHAR short_filepath[MAX_PATH] = {0};
GetShortPathName(strFilepath, short_filepath,MAX_PATH);
strFilepath = short_filepath;
//strApp += _T(" \"");
strApp += L" ";
strApp += strFilepath;
//strApp += _T("\"");
BOOL Ret = CreateProcess(NULL,(TCHAR*)(LPCTSTR)strApp,
NULL,NULL,TRUE,0,NULL,NULL,&Info,&ProcInfo);
return S_OK;
}
中为什么CBCGPGridItem显示错误? |
|