Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have implemented a series of popup DoModal dialogs. All of them display a number which is manipulated by a vertical scrolling control. Using the ::OnVScroll() function I update the button's number. Normally, when the user is happy with the number he/she 'clicks' on the number to dismiss the dialog.

However, I would also like to be able to dismiss the dialog when the user 'clicks' anywhere outside of the dialog.

I have looked into into 'SetWindowsHookEx' and this is not possible for 'WH_MOUSE', I have also tried SetCapture, GetCapture, & ReleaseCapture but they don't work when the dialog has an additional control.

So right now I'm stuck with the system beeping at me when I 'click' outside the dialog. Does anyone know of a work around for this, I can't believe I'm the first one to run into this problem
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900