是否可以在其他过程中将WM_QUERYENDSESSION消息发送到窗口?
问题描述:
我想调试我编写的Windows C ++应用程序,以了解为什么它对WM_QUERYENDSESSION的响应没有达到我的期望.显然,仅通过关闭系统来执行此操作有点棘手.我可以使用任何实用程序或代码向我的应用程序窗口发送伪造的WM_QUERYENDSESSION吗?
I want to debug a windows C++ application I've written to see why it isn't responding to WM_QUERYENDSESSION how I expect it to. Clearly it's a little tricky to do this by just shutting the system down. Is there any utility or code which I can use to send a fake WM_QUERYENDSESSION to my application windows myself?
答
我使用了 Win32 :: GuiTest Perl模块过去曾经做过这种事情.
I've used the Win32::GuiTest Perl module to do this kind of thing in the past.