[英]How can I detect when the “Save as type:” combo box changes using GetSaveFileName on Windows?
I'm using GetSaveFileName
for a Save As dialog in a Windows application. 我在Windows应用程序的“另存为”对话框中使用
GetSaveFileName
。 I'd like to catch when the "Save as type:" combo box changes and get its current index, but I'm not sure how. 我想捕捉一下“另存为类型:”组合框的更改并获取其当前索引,但是我不确定如何。
With a combo box I add myself, I can get messages in the callback ( lpfnHook
) in the OPENFILENAME
struct that we've handed off, and look for the ID of the combo box and the CBN_SELCHANGE
notification. 使用我自己添加的组合框,我可以在传递的
OPENFILENAME
结构的回调( lpfnHook
)中获取消息,并查找组合框的ID和CBN_SELCHANGE
通知。 But I don't know what the ID of the "Save as type:" combo box is, or even if we're allowed access to it in the same way. 但是我不知道“另存为类型:”组合框的ID是什么,或者即使我们被允许以相同的方式访问它,我也不知道。
Is there a way to detect when the "Save as type:" combo box changes and to get its current index before GetSaveFileName
returns? 有没有一种方法可以检测“另存为类型:”组合框何时更改,并在
GetSaveFileName
返回之前获取其当前索引?
如果使用lpfnHook
指定回调,则当用户更改类型时,您将收到CDN_TYPECHANGE
通知消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.