title: Drag and Drop does not work anymore in my project in delphi
body: <p>This topic obviously has been hitted over and over again here, but now I just run out of options from my point of view.</p>
  
  <p><strong>OS:</strong> Windows XP SP3</p>
  
  <p>So, here is <strong>Drag and Drop example for RichEdit</strong> I use in my app:</p>
  
  <pre><code>procedure TForm1.AcceptFiles( var msg : TMessage ); // or TWMDROPFILES
  const
    cnMaxFileNameLen = 255;
  var
    i,
    nCount     : integer;
    acFileName : array [0..cnMaxFileNameLen] of char;
  begin
    // find out how many files we're accepting
    nCount := DragQueryFile( msg.WParam, // or msg.Drop
                             $FFFFFFFF,
                             acFileName,
                             cnMaxFileNameLen );
  
    // query Windows one at a time for the file name
    for i := 0 to nCount-1 do
    begin
      DragQueryFile( msg.WParam, { or msg.Drop} i,
                     acFileName, cnMaxFileNameLen );
  
      // do your thing with the acFileName
      MessageBox( Handle, acFileName, '', MB_OK );
    end;
  
    // let Windows know that you're done
    DragFinish( msg.WParam ); // or msg.Drop
  end;
  </code></pre>
  
  <p>Problem is that after some recent changes ( unforutinetly I do not use any SVN so I cannot track which commit was introducing this issue ) Drag and Drop do not work any more.</p>
  
  <p>I have run breakpoints without success in every event that might be somehow related ( called ):</p>
  
  <pre><code>RichEditMouseOver;
  
  RichEditChange;
  
  FormClick;
  </code></pre>
  
  <p>My app is processing these WM's:</p>
  
  <pre><code>procedure WMDropFiles(var Msg: TWMDROPFILES); message WM_DROPFILES;
  
  procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
  
  procedure WMCopyData(var Msg: TWMCopyData); message WM_COPYDATA;
  
  procedure WMGetMinMaxInfo(var AMsg: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
  
  procedure CMDialogKey(var Msg: TCMDialogKey ); message CM_DIALOGKEY;
  </code></pre>
  
  <p>On blank project with TRichEdit on form - all is working OK.</p>
  
  <p>Also tried changing <a href="http://msdn.microsoft.com/en-us/library/bb776406%28VS.85%29.aspx" rel="nofollow"><code>DragAcceptFiles()</code></a> <code>Form1.Handle</code> to <code>RichEdit.Handle</code> - still no luck.</p>
  
  <p>When echo'ing <code>nCount</code> and <code>acFileName</code> parameters, acFileName do not have File Path of Dragged file ... Why????</p>
  
  <p>Currently I just have no clue what makes the acFileName parameter losing Dragged files path. Could you suggest where problem is hiding?</p>