CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    20

    Question Dialog-Boxes which way to choose ?

    Hi again.
    I want to use dialog-windows in my application. since I don't want to follow the rather prcedural way of coding that microsoft uses in Win32-API I want to build a c++-class that encapsulates a dialog-window.

    For some reasons related to this, I don't want to use dialog-ressources.

    I found out about CreateDialogIndirect but it is not too coder-friendly. I have to build some weird thing that is called dialog-template in memory. At

    http://msdn.microsoft.com/library/de...late_in_memory

    I found an example to do this. This looks also weird to me.

    I think this is definitely not what I want to do. Those dialog-boxes are somewhat inflexible for my needs. For example I want to add controls to my dialog-instance using a member-function of my class like AddControl().

    Enough talk about what I don't like
    Now I thought about the following: Why not build the dialog from a simple window ? I'm sure I can make it modal too like a modal dialog.

    Before I start with this, please tell me: What are the advantages of using CreateDialog or CreateDialogIndirect over my idea, if there are any ? Am I following a possible path, or should return to the regular path ?

    Thanks in advance:

    highhead

    ps: on the system where I started coding, dialogs ARE simple windows made modal.

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354
    If you rewrite you my have to do these

    1. Create and destroy child controls

    2. Handle any template stuff if you gonna support templates

    3. Handle positioning of controls.

    4. Handle keyboard and tabbing functionality

  3. #3
    Join Date
    Apr 2004
    Posts
    20

    Hi kirants

    Of cause I have to do this
    Like in the old times. I thought about all this and it doesn't make me affraid. I want to design a c++-class and do everything inside. so I don't have to do it everytime I want a dialog. for that reason it dosn't look to "heavy" to me.

    Thanks for your opinion

    highhead

  4. #4
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Hi kirants

    Originally posted by highhead
    Of cause I have to do this
    Like in the old times. I thought about all this and it doesn't make me affraid. I want to design a c++-class and do everything inside. so I don't have to do it everytime I want a dialog. for that reason it dosn't look to "heavy" to me.

    Thanks for your opinion

    highhead
    Well, those weren't meant to make you afraid

    Anyways, if this is an fun exercise, it sure should be fun and challenging..

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