June 25, 2024, 06:28:11 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Thoughts on Dialogs VS Windows

Started by donh, February 18, 2006, 09:12:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

donh

Ok all
Hope this will not get everyones features ruffeled but.
Trying to get a handle on when to use a Window or When to use a Dialog.
With the above coulde be base on the same answer is there one that is better or in my case off limited OOP stuff
just procedural what is the perfer method IE easier or will this come with more use and experiance.
Try to get a handel on all this stuf.

;D

Ionic Wind Support Team

Short Answer:  It depends on your application.

Long Answer: 

A dialog has always been meant as a container for controls.  Windows uses a special processing of messages for dialogs to handle things like the default button and tabbing between controls.  A dialog was meant to be a part of the application that gathers data, saves it off and can be called back when needed to gather more information.

A window is a display/output device.  And in the Windows OS it is treated the same as any other output device.  The GDI (graphics device interface) works the same on a window as it does on a printer, as it does on fax driver, etc.

That was the original methodology of the Windows OS.  And if you look at a lot of applications they follow the same idea.  A painting program uses dialogs to gather information, what type of pen is in use, the filename to save the image, the size of a brush, etc.  And uses a window to display the output, in this case the picture being drawn.

Your application determines whether you follow that methodology or not.  It is perfectly normal to have an entire applicaiton using just a dialog for both input and output.  And it is OK to have controls in a window, but you have to fight the nature of Windows to do it, such as doing your own tabbing between controls (which is why we have the EnableTabs method).

Dialogs also employ a special math for coordinates of controls.  A dialog shown in one display resolution will have the same 'look' in another display resolution.  The math is handled for you in Aurora so you don't have to deal with 'dialog units'.

Paul.
Ionic Wind Support Team

donh

So for say an application that will store antretrieve information from a databse would be better with a dialog
iterface that a window as it is takeing input.  And then it would be from if I understand easier to work with and get a better understaning of what is going on and not fight with it as you mentioend.
Thanks that is what I was looking for the books that I have been reading mostley have been giveing examples with windows and not dialogs and I have been trying to
use there ideas on a dialog and then geting totaly confused and flustered :P