Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Open Where it was Last closed
#1
I cant seem to figure this code out

I want to make it where the dialog opens, then if someone moves it, it will open in the exact same spot it was moved to

I know that you need to get the coordinates and rset them when it closes
and when it opens you rget and set the dialog to those coordinates
I just cant get the code to work right

So if anyone could show me an example code i would very much Appreciate it

Thanks very much
#2
what code do u have?
#3
Function Dialog69
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("Dialog69" &Dialog69)) 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: "" 0x2030003 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,RegWinPos hDlg _s.getmacro(getopt(itemid) 1) "\mydialogpos" 0
,case WM_DESTROY
,RegWinPos hDlg _s.getmacro(getopt(itemid) 1) "\mydialogpos" 1
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#4
Thank you so much

It works perfect Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)