/* * HandleMessage */ void FAR HandleMessage( LPMSG pmsg ) { static char msg[80]; static char class_name[80]; int i; if( SpyState != ON ) { return; } if( IsMyWindow( pmsg->hwnd ) ) { return; } if( WindowCount != 0 ) { for( i = 0; i < WindowCount; i++ ) { if( pmsg->hwnd == WindowList[i] ) { break; } } if( i == WindowCount ) { return; } } GetClassName( pmsg->hwnd, class_name, 80 ); ProcessIncomingMessage( pmsg->message, class_name, msg ); if( msg[0] != 0 ) { SpyOut( msg, pmsg ); } } /* HandleMessage */
State ICBMSNACHandler::Process(const SNAC& snac) { switch(snac.Subtype) { case ICBM::SetupResponse: ProcessSetupResponse(snac); break; case ICBM::IncomingMessage: ProcessIncomingMessage(snac); break; case ICBM::MissedMessage: ProcessMissedMessage(snac); break; } return NoChange; }