Bonsoir a tous,
j'ai un petit souci pour détecter ma webcam en c++ ... voici mon code :
this->_handleWC vaut toujours NULL... si vous avez une idée ..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 bool GWebCam::Connect(short Width, short height) { this->_handleWC = capCreateCaptureWindow("handle", WS_CHILD | WS_VISIBLE, 0, 0, largeur, hauteur, NULL, 1); if (this->_handleWC == NULL) std::cout << "dfsdfsdf" << std::endl; if (!capDriverConnect(this->_handleWC, 0)) return (false); this->_hDC_WC = GetDC(this->_handleWC); return (true); } void GWebCam::CaptureImage(const GString &File) { capCaptureSingleFrameOpen(this->_handleWC); capCaptureSingleFrame(this->_handleWC); capCaptureSingleFrameClose(this->_handleWC); capFileSaveDIB(this->_handleWC, File.ToChar()); }
Merci d'avance
Cordialement,
NeoKript
Partager