Global Mouse Hook 2010-09-17 15:18:11 I have designed some kind of custom popup menu that I want to close when the user clicks outside of it. To do this right now I'm setting up a global mouse hook with a line of code like this:SetWindowsHookEx( WH_MOUSE, proc, core_api::get_my_instance(), 0 );and close the menu in proc after checking that the click is outside menu's bounds. But this doesn't work with clicks outside foobar2000's main window. Am I doing something wrong? generally is this the right way to do such thing?Any help/idea is welcome, thanks.