Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Box related to a window
#1
How can I position my dialog box relative to a window displayed on the screen?
#2
If that window is owner of the dialog, just remove DS_CENTER style.
Function Dialog14
Code:
Copy      Help
\Dialog_Editor

int h=win("Notepad")
;if(!ShowDialog("Dialog14" 0 0 h)) ret
if(!ShowDialog("Dialog14" 0 0 h 0 0 0 0 100 30)) ret

;BEGIN DIALOG
;0 "" 0x90C80240 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: "" 0x2030006 "*" "" ""
#3
Is it possible to move with the movement of Dialog Box ??
#4
like here?
Dialog Sticks together
#5
In the code above that you posted Ginstras, i canno't figure out how controls will work in the dialog... here is my code, & it is not working correctly, will not grab the input into the Edit box...

int hwnd=val(_command)
str controls = "4 5"
str e4 c5Aut
if(!ShowDialog(DLG 0 0 hwnd 0 0 0 200 140 &controls)) ret
out e4;; e4 is nothing, it was working til i tried this code...
#6
In the code above that you posted Ginstras, i canno't figure out how controls will work in the dialog... here is my code, & it is not working correctly, will not grab the input into the Edit box...

int hwnd=val(_command)
str controls = "4 5"
str e4 c5Aut
if(!ShowDialog(DLG 0 0 hwnd 0 0 0 200 140 &controls)) ret
out e4;; e4 is nothing, it was working til i tried this code...
#7
ShowDialog
function# [$macro] [dlgproc] [!*controls] [hwndowner] [flags] [style] [notstyle] [param] [x] [y] [$icon] [$menu] ;;flags: 1 nonmodal, 2 macro is DD, 4 set style (default is to add), 64 raw x y.

&controls is 3rd argument

str controls = "4 5"
str e4 c5Aut
if(!ShowDialog(DLG 0 &controls hwnd 0 0 0 200 140)) ret

that should do it.


Forum Jump:


Users browsing this thread: 1 Guest(s)