FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Behaviour of GET on TMDIChild differs from TDialog
Posts: 6
Joined: Wed Apr 25, 2012 05:04 PM
Behaviour of GET on TMDIChild differs from TDialog
Posted: Mon May 14, 2012 10:27 AM
Hello,

I'm a long time ClipperHead programmer and now a newbie in Fivewin converting an aplication to graphical.
Our aplication is MDI and we are working with the MDIClhild windows. When I place a GET in the window the result is diferent that if I place it on a dialog.
The GET lacks the 3D effect, see image:

Why this happen ?
Is this the espected behaviour ?
Are you using TMDIChilds or are working with dialogs ?

Thanks

Josep

xHB 1.2.1 + FWHB 12.04
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Mon May 14, 2012 12:33 PM

Josep

You can add themes support which will change the appearance of your controls and give them a much more professional look.

Look for the resource file called xplook.rc \fwh\samples\winxp and the WindowsXp.Manifest file. Copy them to your project folder, Edit xplook.rc with notepad and change the path of the manfest location and add xplook.rc to your link list.

It will make a nice difference in your application appearance.

Rick Lipkin

Posts: 6
Joined: Wed Apr 25, 2012 05:04 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Mon May 14, 2012 02:18 PM

Hi Rick,

many thanks. This did the trick. But copying the manifest file as name.exe.manifest in the aplication folder.
Compiling with the rc file doesn't work.
Is necessary any other step besides to compiling the manifest file as a resource ?

Thanks again

Josep.

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Mon May 14, 2012 02:52 PM
Josep

Take the code below and save it to the file xplook.rc. Make sure the Windows.Manifest file is located in the same folder as xplook.rc, then compile the file xplook.rc into your exe.

Rick

Code (fw): Select all Collapse
#ifdef __FLAT__
   1 24 ".\WindowsXP.Manifest"
#endif
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Mon May 14, 2012 05:24 PM

Josep,

Also keep in mind that dialogboxes use "dialog base units" meanwhile the MdiChild windows use pixels:

viewtopic.php?p=119360#p119360

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6
Joined: Wed Apr 25, 2012 05:04 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Tue May 15, 2012 09:35 AM

ok,

thanks for your explanation.
Another question regarding units:
What units uses a resource editor (ex. pelles) ?
When design a resource, must we keep in mind if it will be placed on a Dialog or Window ?

Thanks

Josep

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Tue May 15, 2012 09:53 AM

Josep,

Resources editors, as the one provided in PellesC or the Borland Resources Workshop, always use dialog units. Those editors only allow to design dialogboxes, not windows.

To place a control on a window we usually use:

@ nRow, nCol <CONTROL_NAME> ... OF <Container_Window> SIZE nWidth, nHeight [ PIXEL ]

nRow and nCol are the position coordinates. If you use the PIXEL clause then FiveWin will use pixels, instead of a simulation of text characters locations.

nWidth and nHeight are the dimensions of the controls, always in PIXELs.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6
Joined: Wed Apr 25, 2012 05:04 PM
Re: Behaviour of GET on TMDIChild differs from TDialog
Posted: Tue May 15, 2012 03:09 PM

ok,

then wich is the recomended procedure to work in a MDI environment ?
All seems that I must use dialogs to build my interface, but in a MDI I have TMDIChild windows.
If I build a form in a resorce editor and then (via REDEFINE) placed the objects in a window, they will look half size, GETs don't have 3D look, etc
I tried to put a TDialog object as oClient of TMDIChild and the dialog inherits the behaviour of window.

The difference between dialog and window is a new concept for me and need some time to learn.

Thanks

Josep

Continue the discussion