CFanatic

Go Back   CFanatic > Programming > Win32 Programming

Join CFanatic Forum Now

Windows Programming using C++ topic posted under Win32 Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2006, 05:00 AM
HK HK is offline
Junior Member
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
HK is on a distinguished road
| More
Windows Programming using C++

I need to wirte a program that will display the degration of a battery as it's nature of reducing its effective capacity during continous charging and discharging cycles. I looked at Microsoft website and I was able to locate this API called "CallNtPowerInformation". This will be very helpful. However, I have not done any windows programming before. Can someone recommend a book on that. Do i need to need to create a Win32 app for that matter.

Thanks
Reply With Quote
  #2  
Old 06-05-2007, 09:38 PM
Junior Member
 
Join Date: Jun 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
tiger12506 is on a distinguished road
| More
Re: Windows Programming using C++

You might also see if GetSystemPowerStatus might be simpler...

If the API calls do not need a HWND parameter, then you can probably use them without creating any windows. (within reason...)

Code:
#include <windows>

int main() {
  SYSTEM_POWER_STATUS sps;
  GetSystemPowerStatus(&sps);
}
I say to use getsystempowerstatus because in order to use CallNtPowerInformation you have to include another header and a library file as dictated in the requirements section of this page ->
http://msdn2.microsoft.com/en-US/library/aa372675.aspx
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
msdos character mode console programming- multiple windows HowardL Driver Development 0 08-05-2007 11:35 AM
Windows api linking amaldevc Win32 Programming 1 06-06-2007 06:18 PM
Windows 2003 Support AmilHanish Win32 Programming 0 09-29-2006 06:52 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:20 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board