Thanks!
Francis Chau
Posts
-
Need explanation ... -
Need explanation ...Does some of you could tell me what's the function of the codes below: Thanks! void DisplayShape(bool Light) { HPEN hNPen,hOPen; HBRUSH hOldBrush,hNewBrush; COLORREF cfill; if (Light) { if (cluminance == 3) return; cluminance = 3; cfill=RGB(0,255,0); } else switch(cluminance) { case 3: {cluminance--; cfill=RGB(64,255,64); break;} case 2: {cluminance--; cfill=RGB(128,255,128); break;} case 1: {cluminance--; cfill=RGB(192,255,192); break;} default: cfill=RGB(255,255,255); } hdc = GetDC(hWndG); hNPen=CreatePen(PS_SOLID,1,RGB(0,0,0)); hOPen=(HPEN)SelectObject(hdc,hNPen); hNewBrush=CreateSolidBrush(cfill); hOldBrush=(HBRUSH)SelectObject(hdc,hNewBrush); Ellipse(hdc,393,235,443,285); DeleteObject(SelectObject(hdc,hOPen)); DeleteObject(SelectObject(hdc,hOldBrush)); ReleaseDC(hWndG,hdc); }
-
Real time displayHi, The codes below used to create a window to display something. Could some of you tell me that how can I display the real time clock (H:M:S) inside this window... Thanks! hwnd = CreateWindow( szWinName, /* name of window class */ "Capture Testing", /* title */ WS_OVERLAPPEDWINDOW, /* window style - normal */ CW_USEDEFAULT, /* X coordinate - let Windows decide */ CW_USEDEFAULT, /* Y coordinate - let Windows decide */ 480, /* width - let Windows decide */ 320, /* height - let Windows decide */ HWND_DESKTOP, /* no parent window */ NULL, /* no menu */ hThisInst, /* handle of this instance of the program */ NULL /* no additional arguments */ ); g_inst=hThisInst; /* Display the window. */ ShowWindow(hwnd, nWinMode); UpdateWindow(hwnd); hWndG=hwnd; SetTimer(hWndG,1,100,NULL);
-
Need help.....Thanks!
-
Need help.....RtlCopyMemory (ddcamVideoData, lpVHdr->lpData , lpVHdr->dwBufferLength ); ^ ^ ^ ^ could some of you tell me that what's the function of the arrow?? Thanks alot!
-
Need help for LRESULT CALLBACKHi, Could some of you tell me what's the function of the syntax below: Thanks alot! LRESULT CALLBACK WindowFunc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK onCAPErrorCallback(HWND WhatWindow, int ErrorID, LPSTR ErrorMessage); LRESULT CALLBACK OnVideoStreamCallback(HWND hWnd, LPVIDEOHDR lpVHdr); LRESULT CALLBACK detectionFunc(HWND , UINT , WPARAM , LPARAM );
-
Button CreateThanks!
-
Button CreateHi, The codes below are used to create button and activate some function, when I compile it, it shows some error message as below. could some of you tell me how to solve it! Thanks! RunButton ( HWND hwnd ) { CreateWindow( "BUTTON", "Run", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // styles 380, 40, 60, 25, hwnd, NULL, (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL); return 1; } . . . case WM_COMMAND: switch HIWORD(wParam) { case BN_CLICKED: switch (lParam) { case RunButton: <--- error C2051: case expression not constant CetCapConnect( hwnd ); break; } <--- warning C4060: switch statement contains no 'case' or 'default' labels break;
-
Create buttonHi, 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;
-
need helpThanks!
-
need helpHi, I'm new to Visual C++! Could some of you tell me what is the function of int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE hPrevInst, LPSTR lpszArgs, int nWinMode) Thanks!
-
capGrabFrameNoStopThis macro fills the frame buffer with a single uncompressed frame from the capture device. The above discription found in MSDN library, do you know what is the format of the uncompressed frame? is it bitmap??? Thanks alot!
-
Send email VC++Hi, could you tell me does vc++ can send email, if yes, how?? Thanks!
-
Frame comparisoncould some of you tell me how to put the frames into memory buffer for comparison.....
-
How to get a pixel's RGB value.Thanks for your reply! another question, how can I store the frame to buffer from the USB camera, and how to compare two frames if they are different? Thanks alot!
-
How to get a pixel's RGB value.Thank you for your reply, could you give me some idea on it? I have no idea.. :(
-
How to get a pixel's RGB value.Could some of you tell me how to get the RGB value of a pixel from a frame which captured from USB camera.