You can either set it on SendMessage/PostMessage (which will filter the message for all windows) or set it on the message handler (which will filter for only specific windows).
To find the message handler for a window, open Spy++ (not at the same time as OllyDbg or you'll get a system hang
) and locate the window you'd like to watch. Then look in the properties, and the address of the message handler function will be shown. The condition will be something like:
code:
[EBP+8] == ___
(I'm not sure that it's +8, and the message number needs to be in hex)