开发者

How can I know if a window belongs to my program? Using win32 only

How can I know if a window belongs to my program? I guess I can use the window handle to get 开发者_StackOverflow中文版the executable name but that seems like a lot of work and I have to do this repeatedly so I think it might be a performance issue. Is there a simple way to know if a given window handle is from ones own program with win32 or some OS construct? Can't use window titles either due to the nature of this application.


Call GetWindowThreadProcessId and compare the returned process Id against your own (via GetCurrentProcessId) seems simple.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜