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/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/DialogBoxes/UsingDialogBoxes.asp#template_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.
[1502 byte] By [highhead] at [2007-11-18 19:16:27]
# 1 Re: Dialog-Boxes which way to choose ?
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
kirants at 2007-11-9 13:10:02 >
# 2 Re: Dialog-Boxes which way to choose ?
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
highhead at 2007-11-9 13:11:00 >
# 3 Re: Dialog-Boxes which way to choose ?
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 :D

Anyways, if this is an fun exercise, it sure should be fun and challenging..
kirants at 2007-11-9 13:11:57 >