I\'m building an application which needs to filter some mouse clicks system-wide. That is, I need to make the system ignore some mouse button clicks at special occasions.
You could use a method called API hooking - you override specific calls to library functions and give them your own behavior. There are many hooking libraries out there that simplify this task, the most used ones are:
* Microsoft Detours
* MadCodeHook
* Deviare API Hook
* API Hijack
Also see Wikipedia example of hooking Direct3D.
You just need to insert your hooking library into each process in the system but judging from your question I assume you've already achieved that.