I would like have some code run when the PPC is powered on or off. I know this can be done by overriding the WindowProc Event and capturing events. However, when I override it, none of the built in events fire off. I can't find an example of how to properly override this. If there is an existing event that accomplishes this, that would also be useful.
In your CGapiApplication derived class in the method that overrides WindowProc try putting this at the end of your method ( only if your method does not handle the event)
CGapiApplication::WindowProc(hWnd,msg,wParam,lParam);
Basically, this will forward any events your method does not handle to the default CGapiApplication WindowProc handler.