Announcement

Collapse
No announcement yet.

Dialogs within Dialogs ??????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chris Boss
    replied
    Thank You Daniel (and Lance);

    Yes, Yes, it works.

    The key style is to use %DS_CONTROL for the the child dialog.

    Now as far as using %WS_EX_CONTROLPARENT for the parent dialog, there is one note to make. This extended style will be necessary if you use CreateWindow. If you use the Windows Dialogs functions (like I do), then it is NOT needed. You can't use extended styles with the Dialog functions, but fortunately, the %WS_EX_CONTROLPARENT is implied (automatically used) when you use a Dialog function to create your window (according to the MS Docs).

    I would assume that if DDT uses Dialog functions internally (correct me if I am wrong) that it won't need %WS_EX_CONTROLPARENT. If DDT uses CreateWindow, then it would be needed.

    Leave a comment:


  • Lance Edmonds
    replied
    The dialog style equates are: %WS_EX_CONTROLPARENT for the parent dialog, and %DS_CONTROL for the the child dialog.

    Your message loop would normally include an IsDialogMessage() handler.


    -------------
    Lance
    PowerBASIC Support
    ( mailto:[email protected][email protected]</A> )

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Chris,

    If you want the TAB key to work, you have to use "CONTROLPARENT" for the parent window and "CONTROL" for the child window. (prefix WS_ or WS_EX_)

    There are some redrawing problems however I have not solved yet (I'm having a similar problem - with tab controls)

    Regards

    -------------
    Daniel
    [email protected]

    Leave a comment:


  • Chris Boss
    started a topic Dialogs within Dialogs ??????

    Dialogs within Dialogs ??????

    I have a problem that I can't figure out.

    Working with a single Dialog (I use the CreateDialogIndirect function) is no problem when it comes to processing the Tab/Shift Tab keys.

    The problem I have is geting windows to correctly process the Tab key when I have embeded a Dialog as a Child within another Dialog and both have buttons on them.

    Should I try to pass the messages from the Child Dialog to the Parent or use IsDialogMessage with both Dialogs ?

    Has anyone attempted to do this ?

Working...
X