I have a dialog that takes up most of the screen on
my 640 x 480 display. When I switched to 800 x 600
however, it was much smaller (relatively).
So, after searching the posts on the board, this
is what I did.
#compile exe
#include "win32api.inc"
.
.
.
function winmain.....
.
.
local nScreenWidth as long
local nScreenHeight as long
nScreenWidth = GetSystemMetrics(%SM_CXSCREEN )
nScreenHeight = GetSystemMetrics(%SM_CYSCREEN)
x_offset#=nScreenWidth/640
y_offset#=nScreenHeight/480
DIALOG NEW 0,ltitle$,,,420*x_offset#,250*y_offset#,%WS_CAPTION OR %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX OR %WS_SYSMENU,%WS_EX_APPWINDOW TO hDlg
.
.
dialog show modal....
(all the buttone and control values are also multiplied by
the x_offset# and y_offset also)
This seems to work. It now looks relatively the same
size as far as percentage of the screen area.
If I am wrong about this let me know. thanks
------------------
my 640 x 480 display. When I switched to 800 x 600
however, it was much smaller (relatively).
So, after searching the posts on the board, this
is what I did.
#compile exe
#include "win32api.inc"
.
.
.
function winmain.....
.
.
local nScreenWidth as long
local nScreenHeight as long
nScreenWidth = GetSystemMetrics(%SM_CXSCREEN )
nScreenHeight = GetSystemMetrics(%SM_CYSCREEN)
x_offset#=nScreenWidth/640
y_offset#=nScreenHeight/480
DIALOG NEW 0,ltitle$,,,420*x_offset#,250*y_offset#,%WS_CAPTION OR %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX OR %WS_SYSMENU,%WS_EX_APPWINDOW TO hDlg
.
.
dialog show modal....
(all the buttone and control values are also multiplied by
the x_offset# and y_offset also)
This seems to work. It now looks relatively the same
size as far as percentage of the screen area.
If I am wrong about this let me know. thanks
------------------
Comment