I've been working on a script and thought it might be nice to use a dialog with no border. What I discovered was that using the libfunc> technique described in Scripts and Tips for making a dialog borderless, also makes dialog objects unuseable. I have modified the example slightly by adding an edit box and a button. When the following script is run, clicking the button will not cause any effect and the edit box will not accept any data. The script will time out after about 10 seconds.
This is not a big deal but I'm wondering why this occurs and if there is a way to make the dialog borderless and still have a button to press?
Thanks for listening,
Dick
Code: Select all
Dialog>Dialog1
Caption=MyDialog
Width=226
Height=140
Top=267
Left=458
Label=Hello World,80,16,true
Edit=msEdit1,48,32,121,
Button=Ok,72,64,75,25,2
Default=Ok
EndDialog>Dialog1
Let>WS_CAPTION=12582912
Let>WS_MINIMIZEBOX=131072
Let>WS_MAXIMIZEBOX=65536
Let>WS_SYSMENU=524288
Let>WS_THICKFRAME=262144
Let>WS_POPUP=2147483648
Let>WS_CHILD=1073741824
//change the style of MyDialog to non-sizeable with a system menu,
//but no max or min boxes
Show>Dialog1
LibFunc>user32,FindWindowA,dhwnd,TForm,MyDialog
Let>style=WS_CHILD
LibFunc>user32,SetWindowLongA,sres,dhwnd,-16,style
CloseDialog>Dialog1
Show>Dialog1
Let>kk=0
Label>Loop
Add>kk,1
GetDialogAction>dialog1,res1
If>res1=2,EOF
If>kk>1000,EOF
Wait>0.01
Goto>Loop
label>EOF
CloseDialog>Dialog1