![]() |
BatteryMonitor
|
00001 00008 #ifndef _MAIN_H 00009 #define _MAIN_H 00010 00011 00014 #define WINVER 0x0501 00015 00019 #define _WIN32_IE 0x600 00020 #include <initguid.h> 00021 #include <stdlib.h> 00022 #include <windows.h> 00023 #include <winuser.h> 00024 #include <stdio.h> 00025 #include <setupapi.h> 00026 #include <ddk/batclass.h> 00027 #include "mainres.h" 00028 00031 namespace BatteryMonitor{ 00032 00038 LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 00039 00046 void addNotifyIcon(HWND hwnd); 00047 00053 void errOut(void); 00054 00057 void showBatteryInfo(HWND hwnd); 00058 00064 void shutdown(void); 00065 00071 void initDevice(void); 00072 00081 HWND setupWindow(int nCmdShow); 00082 00087 long setupWindowClass(void); 00088 00093 void cleanUp(HWND hwnd); 00094 00102 BATTERY_INFORMATION getBatteryInformation() ; 00103 00104 00107 #define UPDATE_BATTERY 1 00108 00115 char* devicepath; 00116 00129 HBRUSH red,yellow,blue,green; 00130 00134 HINSTANCE instance; 00135 00142 double battery=0; 00143 00148 long batterylifetime=-1; 00149 00154 char classname[14]; 00155 00162 UINT WM_TASKBARCREATED=0; 00163 00166 bool shutdown_enabled=false; 00167 00168 } 00169 #endif /* _MAIN_H */ 00170