Thread: Draq and drop

  1. #1
    Registered User
    Join Date
    Apr 2007

    Draq and drop

    I am working now with the Drag and drop function in Window

    I need my app. to detect the dragged file because the app. only supports *.bmp files

    Is there any function that detects it? Or is this move more sophisticated and needs a struct?

    Thx for any help

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    It's going to require some work using Win32 API:


  3. #3
    Join Date
    Jan 2002
    If all you need is to detect the file type/name then a simpler approach would be handle the WM_DROP message for the target window. You'll need to register the window as a drop target with either the WS_EX_ACCEPTFILES extended window style at window creation or, for an already existing window, use DragAcceptFiles. Using this approach, you could either reject files that don't have the required extension or read the header information for any dropped file to ensure it's a valid bitmap, regardless of extension.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed