Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
screen resolution
#1
i would love to know how to make a dialogue start at the bottom left corner of the taskbar no matter what screen resolution i use and i cant seem to figure this out
#2
Function ( Dialog2 )
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam

if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""

if(!ShowDialog("Dialog2" &Dialog2)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,;;--- INSERT THIS ---
,RECT r
,GetWindowRect(hDlg &r)
,mov 0 ScreenHeight-r.top hDlg
,;;-------------------
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#3
JOHN_ Wrote:Function ( Dialog2 )
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam

if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""

if(!ShowDialog("Dialog2" &Dialog2)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,;;--- INSERT THIS ---
,RECT r
,GetWindowRect(hDlg &r)
,mov 0 ScreenHeight-r.top hDlg
,;;-------------------
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1



k thx very much appreciated id nvr figured that out lol
#4
but doesnt work it moves it to the left like i want but its still not at bottom of svreen i run 800 x 600 and its right above taskbar but when i run 1024 by 768 its way up there this didnt work would be lovely to get a correct answer :oops:
#5
Function Dialog210
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("Dialog210" &Dialog210)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2020100 "" ""


ret
;messages
sel message
,case [WM_INITDIALOG,WINAPI.WM_DISPLAYCHANGE]
,int L T H wH
,GetWorkArea L T 0 H
,GetWinXY hDlg 0 0 0 wH
,mov L T+H-wH hDlg
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#6
i get an error on this line
Error in Dialog210: unknown identifier.
case [WM_INITDIALOG,WINAPI.WM_DISPLAYCHANGE]
i'm using 2.1.9.1
#7
just seen the post and was trying it
#8
Replace WINAPI.WM_DISPLAYCHANGE to 0x007E.
#9
Works perfect as posted.
Think his problem is didnt replace function210 with name of his function.

TY for post.
#10
can anyone edit this to open in top left corner and top right corner plz or tell me wut to change?


Forum Jump:


Users browsing this thread: 1 Guest(s)