Thread: Drag and Drop for controls, and the mystery of dialogs default bgcolor

  1. #1
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555

    Drag and Drop for controls, and the mystery of dialogs default bgcolor

    Is there any way to handle WM_DROPFILES for controls? As there seems to be no way to hijack the window procedure for the common controls and the fact that whoever designed the message for some reason wanted the lParam of the message to be zero instead of something useful, say, the handle of the destination I am not sure how to go about this.
    The web has failed me. In fact, I can't even find a site that explains Drag and Drop at all. I originally stumbled upon WM_DROPFILES by searching these boards actually.

    Next question, is it possible to specify that the window classes you create use the default background color (background for '3D Objects' in Display Properties -> Appearance -> Effects) like the dialog boxes you create in a resource editor uses?
    EDIT: Obsolete, I had the answer in front of me all the time. It's COLOR_WINDOW. Where's sleep when I need it?
    Last edited by OnionKnight; 09-18-2006 at 07:22 PM.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>there seems to be no way to hijack the window procedure for the common controls<<

    Windows subclassing.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555
    Thanks, that's just the solution I needed.

Popular pages Recent additions subscribe to a feed