I have written a code that uses system power broad cast messages. and when laptop is running on AC power it executes a program.

What i want to know is when i try to compile the code with registerpowersettingnotification function dev c++ compiler shows errors. When i remove that function it has compiled successfully and without using registerpowersettingnotification function i am still able to process wm_PowerBroadCast message.

So, i need to know that, i don't need to register my gui window handle for receiving power notifications or do i have to register?

i am using windows 8.1

you shiuld try turbo c++ compiler instead of dev c++