Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controlling the position of a dialog
#1
Ok I will try to explain what I would like to do. I would like to open a smart dialog when I press the open button on (Try_Resize_Rich) but here is where it gets hard. I want the smart dialog to be placed at the bottom right corner of the (3 RichEdit20A 0x54233044 0x200 122 106 66 62 ""). I would also like it to follow the (3 RichEdit20A 0x54233044 0x200 122 106 66 62 "") when I move (Try_Resize_Rich) if that is possible. I will be working on this but I hope you can help.

Function Try_Resize_Rich
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str rea3
if(!ShowDialog("Try_Resize_Rich" &Try_Resize_Rich &controls 0 0 0 0 0 0 0 "dialog.ico" "Try_Resize_Rich")) ret

;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 294 190 "Try_Resize_Rich"
;3 RichEdit20A 0x54233044 0x200 122 106 66 62 ""
;4 Button 0x54032000 0x0 2 4 48 14 "Open"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,case WM_SIZE
,int x y cx cy
,GetWinXY(hDlg x y cx cy)
,MoveWindow id(3 hDlg) 0 40 cx-10 cy-75 1
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,mac "Smart_Dialog"
,;menu items:
,case 101 out "Open"
,case 103 out "Cut"
,case 104 out "Select All"
,case 105 out "Help"
,
,case IDOK
,case IDCANCEL
ret 1

;BEGIN MENU
;>&File
,;&Open : 101 0 0 Co
,;-
,;>&Recent
,,;Empty : 102 0 3
,,;<
,;<
;>&Edit
,;Cu&t : 103 0 0 Cx
,;-
,;Select &All : 104 0 0 Ca
,;<
;&Help : 105 0
;END MENU

Function Smart_Dialog
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

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

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

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)