Create button
-
Hi, Below is the part code, which used to display the frame from camera, my problem is that, can I create some button instead of by press "1"? Thanks! void CetCapConnect(HWND hwnd) { //CAPDRIVERCAPS CapDrvCaps; // structure of the capabilities of the capture driver if (!hWndC) hWndC = capCreateCaptureWindow ( // Create a child capture window LPSTR) "My Capture Window", // window name if pop-up WS_CHILD | WS_VISIBLE, // window style 0, 0, 160, 120, // window position and size (HWND) hwnd, // handle of parent window (int) 0 /* child ID */ ); LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; // handle of device context switch(message) { case WM_CHAR: /* process keystroke */ hdc = GetDC(hwnd); /* get device context */ switch (wParam) { case 49: // pressed "1" to get connect CetCapConnect( hwnd ); break;
-
Hi, Below is the part code, which used to display the frame from camera, my problem is that, can I create some button instead of by press "1"? Thanks! void CetCapConnect(HWND hwnd) { //CAPDRIVERCAPS CapDrvCaps; // structure of the capabilities of the capture driver if (!hWndC) hWndC = capCreateCaptureWindow ( // Create a child capture window LPSTR) "My Capture Window", // window name if pop-up WS_CHILD | WS_VISIBLE, // window style 0, 0, 160, 120, // window position and size (HWND) hwnd, // handle of parent window (int) 0 /* child ID */ ); LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; // handle of device context switch(message) { case WM_CHAR: /* process keystroke */ hdc = GetDC(hwnd); /* get device context */ switch (wParam) { case 49: // pressed "1" to get connect CetCapConnect( hwnd ); break;
Read this article for better understanding of Win32 Enviorment http://www.codeproject.com/useritems/Introduce_Yourself_to_VC.asp[^]
[Vote One Here, Complete my Survey....] Alok Gupta
visit me at http://www.thisisalok.tk "I Think Believe this Will Help"