如何使用该窗口的hwnd获取窗口的开始时间。 [英] How to get the start time of the window with hwnd of that window.

查看:111
本文介绍了如何使用该窗口的hwnd获取窗口的开始时间。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Coders,



在我的程序中,我需要获取应用程序窗口的开始时间。我希望从HWND句柄到该窗口。



感谢您的期待。



我的尝试:



我从HANDLE尝试了这个从该窗口获取的进程,使用



hProcess = OpenProcess(PROCESS_ALL_ACCESS | lpdwProcessId) ;



(其中DWORD lpdwProcessID;来自GetWindowThreadProcessId(hwnd,& lpdwProcessId);)



但是它为相同类型的应用程序提供了相同的开始时间(例如: - 文件夹,Windows Photo Viewer上的多个图像窗口),因为它们具有相同的processID(我在我的真实观察中写这个)。

Hello Coders,

In my program I need to get the start time of the application window.I want this from HWND handle to that window.

Thank You in anticipation.

What I have tried:

I tried this from HANDLE to the process got from that window, using

hProcess = OpenProcess(PROCESS_ALL_ACCESS | lpdwProcessId);

(where DWORD lpdwProcessID; is from GetWindowThreadProcessId(hwnd, &lpdwProcessId);)

But it gives same Start Time for the same kind of applications(example:- folders, multiple image windows on Windows Photo Viewer),as they have same processID(I am writing this on my true observation).

推荐答案

您可以获取流程的开始时间。窗口上没有附加此类数据。窗口的开始时间不存在,Windows不会跟踪。
You can get the start time of a process. There is no such data attached to a window. The "start time" of a window doesn't exist and is not tracked by Windows.


这篇关于如何使用该窗口的hwnd获取窗口的开始时间。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆