开发者

Absolute path from window handle

开发者 https://www.devze.com 2022-12-20 02:51 出处:网络
I open a file in windows word and get a handle to the window. Can I get the 开发者_运维技巧absolute path of the file (the actual .doc file, not the winword.exe)?

I open a file in windows word and get a handle to the window. Can I get the 开发者_运维技巧absolute path of the file (the actual .doc file, not the winword.exe)?

Thanks a lot


You certainly won't be able to do this direct from the Windows API (where a program's document is stored and how it is manageded is not controlled / constrained by the Windows API)...

What you might be able to do is use the Word libraries to iterate through open documents and look for the document with a matching handle, but I doubt this will be simple - I'm not even sure if it will be possible...

Martin.

0

精彩评论

暂无评论...
验证码 换一张
取 消