i have no code yet and have been reading msdn but i cant understand how it works properly , is there any tuts with working samples for this ,
i have no code yet and have been reading msdn but i cant understand how it works properly , is there any tuts with working samples for this ,
Why? MSDN tells you EVERYTHING that you need to know:
DL_CANCELDRAG
DL_BEGINDRAG
DL_DRAGGING
DL_DROPPED
There's also Google.
EDIT:
Okay, So here is somthing on DL_BEGINDRAG:
Code:DL_BEGINDRAG: { DRAGLISTINFO dli = *((LPDRAGLISTINFO)lParam); dli.uNotification; // The notification. dli.hWnd; // Handle to the window. dli.ptCursor; // Current coords of the cursor. int idCtl = (int)wParam; // The controls ID. } break;
Last edited by Queatrix; 06-04-2007 at 05:44 PM.
yes but i dont know where it goes , does it go in the message loop , as a case label?
I would assume it goes in the callback like so:
I haven't tested it, so I could very well be wrong.Code:BOOL CALLBACK DialogCallback(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { DL_BEGINDRAG: { DRAGLISTINFO dli = *((LPDRAGLISTINFO)lParam); dli.uNotification; // The notification. dli.hWnd; // Handle to the window. dli.ptCursor; // Current coords of the cursor. int idCtl = (int)wParam; // The controls ID. } break; default: return FALSE; } return TRUE; }
If you want to capture a single frame as a still image, you can use the WM_CAP_GRAB_FRAME_NOSTOP or WM_CAP_GRAB_FRAME message (or the capGrabFrameNoStop or capGrabFrame macro) to capture the digitized image in an internal frame buffer. You can freeze the display on the captured image by using WM_CAP_GRAB_FRAME. Otherwise, use WM_CAP_GRAB_FRAME_NOSTOP.
Once captured, you can copy the image for use by other applications. You can copy an image from the frame buffer to the clipboard by using the WM_CAP_EDIT_COPY message (or the capEditCopy macro). You can also copy the image from the frame buffer to a device-independent bitmap (DIB) by using the WM_CAP_FILE_SAVEDIB message (or the capFileSaveDIB macro).
Your application can also use the two single-frame capture messages to edit a sequence frame by frame, or to create a time-lapse photography sequence.
CODE:
capGrabFrame(hwndVideo);//this pauses the video feed in teh current camera hwndVideo
capFileSaveDIB(hwndVideo,"image.jpeg");