When clicked a button on any application, play sound
-
Hi All: I wanna implemented a application with MFC, when clicke a button on any application, select a icon on the desktop then play sound. I try to implement similar function with ON_WM_LBUTTONDOWN(), but not satisfied my request. If I click everywhere on desktop, it will play sound too. How do I implement this application? Does any keyword or reference? My English is not good. Please forgive me. Best regards, Victor
-
Hi All: I wanna implemented a application with MFC, when clicke a button on any application, select a icon on the desktop then play sound. I try to implement similar function with ON_WM_LBUTTONDOWN(), but not satisfied my request. If I click everywhere on desktop, it will play sound too. How do I implement this application? Does any keyword or reference? My English is not good. Please forgive me. Best regards, Victor
-
Hi All: I wanna implemented a application with MFC, when clicke a button on any application, select a icon on the desktop then play sound. I try to implement similar function with ON_WM_LBUTTONDOWN(), but not satisfied my request. If I click everywhere on desktop, it will play sound too. How do I implement this application? Does any keyword or reference? My English is not good. Please forgive me. Best regards, Victor
-
you need Windows Hooks to capture all mouse clicks; see http://msdn.microsoft.com/en-us/library/windows/desktop/ms644959(v=vs.85).aspx[^].
Veni, vidi, abiit domum
But, I added WM_LBUTTONDOWN into Mousehookproc, it does not work. which do I add in, WinProcHook or Mousehookproc? if I add into WinProcHook, how can I get the button? Thanks for your help, Victor
-
But, I added WM_LBUTTONDOWN into Mousehookproc, it does not work. which do I add in, WinProcHook or Mousehookproc? if I add into WinProcHook, how can I get the button? Thanks for your help, Victor
-
But, I added WM_LBUTTONDOWN into Mousehookproc, it does not work. which do I add in, WinProcHook or Mousehookproc? if I add into WinProcHook, how can I get the button? Thanks for your help, Victor
Please verify that the Hook got installed properly. Once the hook is installed, you should be able to get the messages. When the mouse event is received, you can check the window handle. Using that window handle, identify the class type of the window.
[Delegates] [Virtual Desktop] [Tray Me !]
-Malli...! :rose:****