Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move Dialog to Bottom Right on all Screen Reso
#1
okay i know there is a code where you make a dialog appear at the bottom left of all Screen Resolutions
I was wondering if anyone has to code to make it appear at the bottom right of all Screen Resolutions

Here is the code im talking about to make a dialog appear at the bottom left of all screens
you put it under INIT_DIALOG

int L T H wH
GetWorkArea L T 0 H
GetWinXY hDlg 0 0 0 wH
mov L T+H-wH hDlg

Please if you have the code i would be greatful if you could post it

Thanks
#2
Use negative x y with ShowDialog. Then they are relative to the right and/or bottom of the work area.

Function Dialog61
Code:
Copy      Help
\Dialog_Editor

if(!ShowDialog("Dialog61" 0 0 0 0 0 0 0 -1 -1)) 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: "" 0x2030001 "" "" ""
#3
Thanks that worked great

but i cant seem to get it to work in my show dialog code
im making an exe so i have the dialog and a showdialog code
i didn't decide to put them together
this is my show dialog code
where do i put the 0 0 0 0 0 0 0 -10 -10 in?
i used -10 -10 so it would be a little above the bottom right

Code:
Copy      Help
str controls = "3 4 7 8 11"
str e3 e4 c7Aut e8 c11Sta
if(!ShowDialog("Function3" &Function3 &controls)) ret

Thanks very much
#4
after &controls append five 0 and two -10
#5
okay you mean like this

str controls = "3 4 7 8 11"
str e3 e4 c7Aut e8 c11Sta
if(!ShowDialog("Function3" &Function3 &controls 0 0 0 0 0 -10 -10)) ret

when i do that it appears in the middle of the screen
maybe a different number of 0 s?
#6
The code is correct. Don't know why it does not work for you.
#7
okay here is my dialog and showdialog code

see if you can get it to work

Function2

\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

BEGIN DIALOG
0 "" 0x90CA0A44 0x100 0 0 149 114 "test"
3 Edit 0x54830080 0x200 40 16 102 14 ""
4 Edit 0x54830080 0x200 40 46 102 14 ""
5 Static 0x54000000 0x0 24 18 48 12 "account:"
6 Static 0x54000000 0x0 4 48 48 12 "Password:"
7 Button 0x54013003 0x1 8 68 134 21 "LOGIN"
10 Static 0x54000000 0x0 38 34 104 8 "CREATED BY: BOYONMOPED"
9 Static 0x54000000 0x0 10 98 28 10 "points:"
8 Edit 0x54030080 0x200 40 96 102 14 ""
12 Button 0x54020007 0x0 2 0 146 92 ""
END DIALOG
DIALOG EDITOR: "" 0x2020105 "" ""



ret
messages
sel message
case WM_INITDIALOG
case WM_DESTROY
case WM_COMMAND goto messages2
ret
messages2
sel wParam
case 7
mac "start_stop"
case IDOK
case IDCANCEL

Function3
Code:
Copy      Help
str controls = "3 4 7 8"
str e3 e4 c7LOG e8
if(!ShowDialog("Function2" &Function2 &controls 0 0 0 0 0 -10 -10)) ret
#8
The dialog is in the right-bottom corner.

Maybe some functions in your System folder are modified. Click 'Check extensions' button in Options...

Or maybe you need to upgrade QM. Don't remember in which version x y were added.
#9
I just made a completely new dialog with all the same ids

now it works

thanks


i use 2.2.1.5 QM


Forum Jump:


Users browsing this thread: 1 Guest(s)