简体   繁体   中英

How a C++ windows dialog based program to get system a status from time to time

I made a program on the base of this project:

http://www.codeproject.com/Articles/6003/Minimize-your-app-to-systray-in-easy-steps

The project from this link initially could not run under Visual Studio 2015, so I made some fixes to run. Here is the project I've made so far:

https://github.com/mitko-z/BatteryAlarm

This program I want to make it to get some system information from time to time and when an event happens a popup window to appear. But I am very new to C++ windows forms programming and I don't know where to put these checks in the project files (or maybe I should make new files???).

If anyone could give me some tips...

Thanks in advance!

The Windows Management Instrumentation system provides a method by which your application may receive notification of system events (such as battery status). If you are new to C++ and COM interfaces you might find it a bit overwhelming, but there is sample code available on the Microsoft web site. Take a look at https://msdn.microsoft.com/en-us/library/aa394582(v=vs.85).aspx

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