我想將本機相機應用程序嵌入到自定義表單中。 我想嵌入相機的RECT r屬性如下:如何在屏幕上重新定位/調整資源大小?
r.top = 26; r.bottom = 220; r.left = 0; r.right = 320;
,這是運行於本地相機應用程序的方法,包括:
HRESULT CPhotoCapture :: CameraCapture(HWND hwndOwner,LPTSTR pszFilename) { HRESULT HRESULT; SHCAMERACAPTURE shcc;
//Set the SHCAMERACAPTURE structure
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
shcc.hwndOwner = hwndOwner;
shcc.pszInitialDir = _T("\\My Documents");
shcc.pszDefaultFileName = _T("test.jpg");
shcc.pszTitle = _T("Camera Demo");
shcc.StillQuality = CAMERACAPTURE_STILLQUALITY_HIGH;
shcc.VideoTypes = CAMERACAPTURE_VIDEOTYPE_MESSAGING;
shcc.nResolutionWidth = 1024;
shcc.nResolutionHeight = 768;
shcc.nVideoTimeLimit = 15;
shcc.Mode = CAMERACAPTURE_MODE_STILL;
//display the camera capture dialog
hResult = SHCameraCapture(&shcc);
if(hResult == S_OK)
{
//TODO:: Write to log
}
return hResult;
}
的方法,上述從窗口,其尺寸等於r稱爲:
HRESULT hr = S_OK;
hr = m_PhotoCapture.CameraCapture(this->m_hWnd, L"test");
沒有人知道如何修改上述功能(hwndOwner)的方式在矩形r中顯示嵌入的資源?
是的,我有一個子窗口CCameraView和方法被調用以下方式: HRESULT hr = S_OK; hr = m_PhotoCapture.CameraCapture(this-> m_hWnd,L「test」); – 2008-12-12 15:16:49