7,655
社区成员
发帖
与我相关
我的任务
分享
HRESULT CameraCaptureExample(HWND hwndOwner, LPTSTR pszFilename)
{
HRESULT hResult;
// Set the SHCAMERACAPTURE structure.
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
shcc.hwndOwner = hwndOwner;
shcc.pszInitialDir = TEXT("\\My Documents");
shcc.pszDefaultFileName = TEXT("test.3gp");
shcc.pszTitle = TEXT("Camera Demo");
shcc.<MSHelp:link keywords="wce51lrfCAMERACAPTURE_VIDEOTYPES" TABINDEX="0">VideoTypes</MSHelp:link> = CAMERACAPTURE_VIDEOTYPE_MESSAGING;
shcc.nResolutionWidth = 176;
shcc.nResolutionHeight = 144;
shcc.nVideoTimeLimit = 15;
shcc.<MSHelp:link keywords="wce51lrfCAMERACAPTURE_MODE" TABINDEX="0">Mode</MSHelp:link> = CAMERACAPTURE_MODE_VIDEOWITHAUDIO;
// Display the Camera Capture dialog.
// The next statements will execute only after the user takes
// a picture or video, or closes the Camera Capture dialog.
if (S_OK == hResult)
{
StringCchCopy(pszFilename, MAX_PATH, shcc.szFile);
}
return hResult;
}