Width of border dialog

Width of border dialog

Postby Marc Vanzegbroeck » Fri Jul 18, 2008 11:13 am

Hi,

What value do have to use in GetSysMetrics() to return the thickness of dthe dialog-border?

Image

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Fri Jul 18, 2008 11:36 am

Marc,

Try with:

#define SM_CXDLGFRAME 7
#define SM_CYDLGFRAME 8
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Fri Jul 18, 2008 1:38 pm

Antonio,

Thankt that is correct. The problem why I thought this is not the correct value is that I added to oWnd:nLeft, but this value is nagative.
Can you try this sample. Here I get the value -8 instead of 0


Code: Select all  Expand view
#include "FiveWin.ch"
func test()
   local oWnd
   DEFINE WINDOW oWnd TITLE 'Test'

   ACTIVATE WINDOW oWnd MAXIMIZED on init(msginfo(oWnd:nLeft))
return


Why is this not 0?
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Marcelo Via Giglio » Fri Jul 18, 2008 4:08 pm

Hello,

with GetSysMetrics() we can get metrics values about dialog, how we can set these values,
is it possible?

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Postby Marc Vanzegbroeck » Fri Jul 18, 2008 6:43 pm

Marcelo,

You can change the height and witdth of a dialog with oDlg:nWidth and oDlg:nHeight
You can also get the height and witdth of the dialog calling those.

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Marcelo Via Giglio » Fri Jul 18, 2008 7:02 pm

Marc,

thanks for your response, but I talk about other metrics, like the caption of dialog

regards

Marcelo

Marc Vanzegbroeck wrote:Marcelo,

You can change the height and witdth of a dialog with oDlg:nWidth and oDlg:nHeight
You can also get the height and witdth of the dialog calling those.

Regards,
Marc
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Postby Antonio Linares » Fri Jul 18, 2008 7:08 pm

Marc,

-8 is ok for a maximized window, as Windows places the left border of the maximized window out of the visible screen
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Fri Jul 18, 2008 7:10 pm

Marcelo,

It seems that Windows API function SystemParametersInfo() lets change some of the system settings. We have never tested it.

http://msdn.microsoft.com/en-us/library/ms724947(VS.85).aspx
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 58 guests