Width of border dialog

Post Reply
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Width of border dialog

Post by Marc Vanzegbroeck »

Hi,

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

Image

Thanks,
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Try with:

#define SM_CXDLGFRAME 7
#define SM_CYDLGFRAME 8
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

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

#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
Marcelo Via Giglio
Posts: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Post by Marcelo Via Giglio »

Hello,

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

regards

Marcelo
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

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: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Post by Marcelo Via Giglio »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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 ... S.85).aspx
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply