Thread: need help with DL_BEGINDRAG, DL_DRAGGING, DL_CANCELDRAG, or DL_DROPPED.

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    319

    need help with DL_BEGINDRAG, DL_DRAGGING, DL_CANCELDRAG, or DL_DROPPED.

    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 ,

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    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.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    319
    yes but i dont know where it goes , does it go in the message loop , as a case label?

  4. #4
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I would assume it goes in the callback like so:
    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;
    }
    I haven't tested it, so I could very well be wrong.

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    1
    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");

Popular pages Recent additions subscribe to a feed