void CC() { if (CCDone == TRUE) // already has the hook? return; acutPrintf( "watching ctrl-C...\n" ); if (acedRegisterWatchWinMsg(watchCC) == FALSE) acutPrintf("Can't register Windows Msg hook - WatchCC\n"); else CCDone = TRUE; }
virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) { AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ; // TODO: Add your initialization code here if (!InitSystem()) { return AcRx::kRetError ; } InitApplication() ; if (!bWatchSelectDone) { if (acedRegisterWatchWinMsg(WatchSelect)==FALSE) { acedPrompt(_T("\nhook can't be registered.")) ; } else { acedPrompt(_T("hook been registered!\n")); bWatchSelectDone = TRUE; } } return (retCode) ; }