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

    Tab-order in modeless/modal diaogs......

    Hi,
    I'm having a problem with the tab-order of controls in a modeless dialog 'pasted' on to a modal dialog. The solution is already available in the 'Dialog' section of
    CodeGuru and it says use DS_CONTROL style. I'm working on a 16-bit application and 16-bit doesn't have DS_CONTROL dialog style. Can anybody help with a 16-bit version of this solution...????

    Thanx
    Ram


  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Tab-order in modeless/modal diaogs......

    It's not easy. If you're using MFC, you would probably need to override PreTranslateMessage() for the dialog and check for the tab key. Also SetFocus() and GetFocus() may need to be implemented.

    Something that may help is that here is a virtually undocumented 16-bit CPropertyPage and CPropertySheet in the MFC source code for Visual C++ 1.52. You can check the source to see how they implemented their tab order logic.

    Another thing is that tab order is dictated by the z-order of the child-windows. You can change tab-order at runtime by calling SetWindowPos().

    Regards,

    Paul McKenzie


  3. #3
    Join Date
    Jun 1999
    Posts
    4

    Re: Tab-order in modeless/modal diaogs......

    I had the same problem, and both the PreTranslateMessage() hint and the source code of CPropertySheet turned out useful! I managed to code a workaround for MSVC 1.52; I posted it as a comment to the entry in the 'Dialog' section.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured