Why doesn't my form receive WM_DropFiles when files are dropped on it?

前端 未结 2 1786
遇见更好的自我
遇见更好的自我 2020-12-11 05:38

I am using Embarcadero RAD Studio XE to develop an application. I am trying catch the file(s) drag and drop to the application with the following code

TMainF         


        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 06:26

    in TForm.Create use two lines

    ChangeWindowMessageFilter (WM_DROPFILES, MSGFLT_ADD);
    
    ChangeWindowMessageFilter (WM_COPYGLOBALDATA, MSGFLT_ADD);
    

    that's all

提交回复
热议问题