pRIController should be AddRef()ed in WndProc. Also fixed a bug where WM_NCDESTROY was not being sent due to using PostMessage instead of DestroyWindow