Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以编程方式关闭 Windows查找和替换对话框以确保发送FINDMSGSTRING消息,以便获取设置以保存它们?DestroyWindow不发送消息。
FindText()并且ReplaceText()都为对话框返回一个 HWND。如果您想以编程方式自行关闭该 HWND,请向其发送WM_CLOSE消息。如果用户关闭对话框,这与对话框收到的消息相同。它会在关闭后自行销毁,但这使它有机会向FINDMSGSTRING您发送最后的消息。
FindText()
ReplaceText()
WM_CLOSE
FINDMSGSTRING