Clicking outside of modal dialog

xxxmvpxxx

New member
Using Windows Mobile 6, I have implemented a Dialog-based app that creates a series of buttons that when 'clicked' will display corresponding DoModal dialogs. All dialogs 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' (OK) 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 (including another button). I have looked into into 'SetWindowsHookEx' and this is not possible (on Windows Mobile) for 'WH_MOUSE', I have also tried SetCapture, GetCapture, & ReleaseCapture but they don't work when the dialog has an additional control. Could someone tell me why 'SetWindowsHookEx', 'MouseHook', and 'SetWinEventHook' are not implemented in Windows Mobile?

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, It looks like I will have to implement mode less dialogs and manage the additional complexity of knowing when to dismiss (delete) these multiple dialogs.
 
Back
Top