HRESULT hReturn; SHCAMERACAPTURE shcc; //SetWindowPos(this,20,20,176,144,SWP_SHOWWINDOW); ZeroMemory(&shcc, sizeof(shcc)); shcc.cbSize = sizeof(shcc); shcc.hwndOwner = NULL; shcc.pszInitialDir = L"//Application Data//"; shcc.pszDefaultFileName = L"dd.jpg"; shcc.pszTitle = L"dsfsdafdasf"; shcc.StillQuality = CAMERACAPTURE_STILLQUALITY_DEFAULT ; shcc.VideoTypes = CAMERACAPTURE_VIDEOTYPE_ALL; shcc.nResolutionWidth = 176;//GetSystemMetrics(SM_CXSCREEN); shcc.nResolutionHeight = 144;//GetSystemMetrics(SM_CYICON); shcc.nVideoTimeLimit = 0; shcc.Mode = CAMERACAPTURE_MODE_STILL ; hReturn = SHCameraCapture(&shcc); switch (hReturn) { case S_OK: // The method completed successfully break; case S_FALSE: // The user canceled the Camera Capture dialog box. break; case E_INVALIDARG: // An invalid argument was specified. break; case E_OUTOFMEMORY: // There is not enough memory to save the image or video. break; default: // An unknown error occurred. break; } return;
wince下高级API调用Camer
最新推荐文章于 2017-11-08 18:31:00 发布