Page 1 of 1
Width of border dialog
Posted: Fri Jul 18, 2008 11:13 am
by Marc Vanzegbroeck
Hi,
What value do have to use in GetSysMetrics() to return the thickness of dthe dialog-border?
Thanks,
Marc
Posted: Fri Jul 18, 2008 11:36 am
by Antonio Linares
Marc,
Try with:
#define SM_CXDLGFRAME 7
#define SM_CYDLGFRAME 8
Posted: Fri Jul 18, 2008 1:38 pm
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
Posted: Fri Jul 18, 2008 4:08 pm
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
Posted: Fri Jul 18, 2008 6:43 pm
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
Posted: Fri Jul 18, 2008 7:02 pm
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
Posted: Fri Jul 18, 2008 7:08 pm
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
Posted: Fri Jul 18, 2008 7:10 pm
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