简体   繁体   中英

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. 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. 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.

Is there a way to detect when the "Save as type:" combo box changes and to get its current index before GetSaveFileName returns?

如果使用lpfnHook指定回调,则当用户更改类型时,您将收到CDN_TYPECHANGE通知消息。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM