Behaviour of GET on TMDIChild differs from TDialog

Behaviour of GET on TMDIChild differs from TDialog

Postby Josep » 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:
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
Josep
 
Posts: 6
Joined: Wed Apr 25, 2012 5:04 pm

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Rick Lipkin » 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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Josep » Mon May 14, 2012 2: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.
Josep
 
Posts: 6
Joined: Wed Apr 25, 2012 5:04 pm

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Rick Lipkin » Mon May 14, 2012 2: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: Select all  Expand view


#ifdef __FLAT__
   1 24 ".\WindowsXP.Manifest"
#endif

 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Antonio Linares » Mon May 14, 2012 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Josep » Tue May 15, 2012 9: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
Josep
 
Posts: 6
Joined: Wed Apr 25, 2012 5:04 pm

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Antonio Linares » Tue May 15, 2012 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Behaviour of GET on TMDIChild differs from TDialog

Postby Josep » Tue May 15, 2012 3: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
Josep
 
Posts: 6
Joined: Wed Apr 25, 2012 5:04 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests