CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: DoModal issue

  1. #1
    Join Date
    Mar 2010

    DoModal issue

    On Windows Mobile 6 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 Windows Mobile. 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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: DoModal issue

    You may want to look at handling the WM_ACTIVATE message.

  3. #3
    Join Date
    Oct 2009

    Smile Re: DoModal issue

    You might try with non-modal dialogs. That way you could handle the mouse click outside of the popups.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.