You want WH_CALLWNDPROC or WH_CALLWNDPROCRET depending whether you want to trap before or after the program has processed the message.