FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour different DEFINE WINDOW and DEFINE DIALOG
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
different DEFINE WINDOW and DEFINE DIALOG
Posted: Sun Jun 01, 2008 10:24 AM

what is different in using DEFINE WINDOW and DEFINE DIALOG

best regards
kajot

best regards

kajot
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: different DEFINE WINDOW and DEFINE DIALOG
Posted: Sun Jun 01, 2008 03:07 PM

DEFINE WINDOW is for creating WINDOWs and DEFINE DIALOG is for creating DIALOGs. What else? :-)

EMG

Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
Re: different DEFINE WINDOW and DEFINE DIALOG
Posted: Sun Jun 01, 2008 09:44 PM
kajot wrote:what is different in using DEFINE WINDOW and DEFINE DIALOG

best regards
kajot


This is a question that i asked myself several times.

No matter if i define a window or a dialog, i can place there controls like gets, says, listboxes, browses and more.
Apart from MDI designed applications, the differences i know ist that a dialog has other units for it's dimensions, you can ask for oDlg:nResult and a window can not be designed with Borland Workshop.

I suppose that kajot's question ( and also mine ) was about the real differences between dialogs and windows.

Regards,
Detlef
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
different DEFINE WINDOW and DEFINE DIALOG
Posted: Sun Jun 01, 2008 10:32 PM

Detlef,

>
I suppose that kajot's question ( and also mine ) was about the real differences between dialogs and windows.
>

The differences comes from the Windows API itself:

Windows manages windows and dialogs as different kind of objects, though in fact, a dialog is a kind of a window (a specialized one for managing controls). i.e: In a standard window, Tab will not change the focus to the next control.

FiveWin closely follows the Windows API where you can find CreateWindow() for creating a window and CreateDialog() (and DialogBox(), etc.) for creating a dialog.

The Windows API provides support for building a dialog from resources, but does not offer such functionality for windows. This is just an example, there are some more differences.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
different DEFINE WINDOW and DEFINE DIALOG
Posted: Mon Jun 02, 2008 03:00 AM
Dear Antonio,

I think if FW add more option cluase like RESIZE16 for Dialog to use the same dimension of Window. Then we can use
@ 10, 10 SAY 'Hello world' OF oDlg
ACTIVATE DIALOG oDlg ASWIN

show like

@ 10, 10 SAY 'Hello world' OF oWnd
ACTIVATE DIALOG oWnd

It'll be good.

Regards,
Dutch[/b]
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
different DEFINE WINDOW and DEFINE DIALOG
Posted: Mon Jun 02, 2008 07:49 AM

Dutch,

Yes, you are right, but we have to keep backwards compatibility, or we can break many users applications.

Also, its a better choice if we let the Windows API manage the dimensions by itself. If we change the dimensions, the results may be different for different resolutions, fonts, etc.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion