ChangeWindowMessageFilter Invalid (Issue #24940)

20 views
Skip to first unread message

pollux

unread,
Nov 5, 2024, 3:24:29 AM (7 days ago) Nov 5
to wx-...@googlegroups.com, Subscribed

I have used wxFileDropTarget to implement file drag-and-drop in the edit box space, but this feature fails when administrator privileges are started, mainly because of Windows' message isolation mechanism, but there are ways to work around this isolation mechanism. Just add the following code at initialization.

ChangeWindowMessageFilter(0x0049, MSGFLT_ADD);
ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);

But I found that this mechanism did not work for wxWidgets applications, and I used an MFC test program that was fine.

Is this because wxWidgets does something special with this message?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24940@github.com>

pollux

unread,
Nov 5, 2024, 3:25:52 AM (7 days ago) Nov 5
to wx-...@googlegroups.com, Subscribed

1.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24940/2456525747@github.com>

VZ

unread,
Nov 11, 2024, 1:22:10 PM (yesterday) Nov 11
to wx-...@googlegroups.com, Subscribed

Sorry but you will need to explain much better what exactly you're doing, ideally providing a way to reproduce the problem in the dnd sample, which uses wxFileDropTarget, and what exactly doesn't work to have any chance of getting a useful answer. As it stands, I can only say that no, we don't do anything "special" with this message, other than, obviously, processing it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24940/2468782438@github.com>

pollux

unread,
4:46 AM (10 hours ago) 4:46 AM
to wx-...@googlegroups.com, Subscribed

Hello, I have an edit box in the wxWidgets dialog. The edit box supports wxFileDropTarget, and you can drag and drop file paths in. When the program is launched as a face to face login user (e.g. test-user), it works fine.
However, when the right mouse button runs this program with administrator privileges, the drag-and-drop function fails. This problem is also repeated with MFC programs, essentially because of the system's message isolation mechanism (explorer.exe can't send messages to administrator-privileged programs). MFC programs can use the following code to allow messages in, but wxWidgets can't. Add the following 2 lines of code
ChangeWindowMessageFilter (0 x0049, MSGFLT_ADD);
ChangeWindowMessageFilter (WM_DROPFILES MSGFLT_ADD);


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24940/2470061695@github.com>

Reply all
Reply to author
Forward
0 new messages