|
Post by Walt Decker on Jul 12, 2022 15:40:52 GMT -5
RESIZEHANDLER fails with dialog forms. Given:
' FUNCTION FN.CreateDlg(Title$, Ux, Uy, Wide, High)
WS.BORDER = HEXDEC("&H00800000") WS.DLGFRAME = HEXDEC("&H00400000") WS.SYSMENU = HEXDEC("&H00080000") WS.THICKFRAME = HEXDEC("&H00040000") WS.MINIMIZEBOX = HEXDEC("&H00020000") WS.MAXIMIZEBOX = HEXDEC("&H00010000") WS.CAPTION = HEXDEC("&H00C00000")
WS.EX.CONTROLPARENT = HEXDEC("&H00010000") WS.EX.APPWINDOW = HEXDEC("&H00040000") WS.EX.TOPMOST = HEXDEC("&H00000008")
ES.MULTILINE = HEXDEC("&H0004") ES.AUTOVSCROLL = HEXDEC("&H0040") ES.AUTOHSCROLL = HEXDEC("&H0080") ES.NOHIDESEL = HEXDEC("&H0100") ES.WANTRETURN = HEXDEC("&H1000")
WS.VSCROLL = HEXDEC("&H00200000")
RetVal = 0
Bx = 0 By = 0
STYLEBITS #DLG.EDIT, ES.WANTRETURN OR ES.NOHIDESEL OR ES.AUTOVSCROLL OR _ ES.MULTILINE OR WS.VSCROLL, ES.AUTOHSCROLL, 0, 0
STYLEBITS #DLG, WS.CAPTION OR WS.MODALFRAME OR WS.SYSMENU OR WS.MINIMIZEBOX OR _ WS.THICKFRAME, WS.BORDER, WS.EX.CONTROLPARENT OR _ WS.EX.APPWINDOW, 0
UpperLeftX = Ux UpperLeftY = Uy WindowWidth = Wide WindowHeight = High
'RetVal = FN.SetWinPos(Ux, Uy) 'RetVal = FN.SetWinSize(Wide, High)
TEXTBOX #DLG.EDIT, 5, 5, Wide, High
OPEN Title$ FOR DIALOG AS #DLG
PRINT #DLG, "RESIZEHANDLER RESIZE.DLG" '<--- FAIL with Runtime Error: IsEmpty PRINT #DLG, "TRAPCLOSE DLG.DONE"
END FUNCTION '
'----------------------------------------------------- '-----------------------------------------------------
|
|
|
Post by Chris Iverson on Jul 12, 2022 20:12:10 GMT -5
I think you deleted some of the code by accident when you made your edit.
|
|
|
Post by Rod on Jul 13, 2022 1:51:06 GMT -5
Well the help file tells us that. But perhaps this was a workaround demo?
|
|
|
Post by Walt Decker on Jul 13, 2022 9:26:41 GMT -5
There is no code missing.
I posted this to make a point. A dialog form is the same as a window form except it is created via a template that specifies its base properties. A dialog form can have all the functionality of a window form including system menus, drop-down menus, sizing border and overlay. Liberty Basic should not make a distinction between a dialog form and a window form if it is going to allow the coder to change the dialog form via STYLEBITS or API User32.dll function SetWindowLong().
|
|
|
Post by Carl Gundel on Jul 14, 2022 7:56:13 GMT -5
There is no code missing. I posted this to make a point. A dialog form is the same as a window form except it is created via a template that specifies its base properties. A dialog form can have all the functionality of a window form including system menus, drop-down menus, sizing border and overlay. Liberty Basic should not make a distinction between a dialog form and a window form if it is going to allow the coder to change the dialog form via STYLEBITS or API User32.dll function SetWindowLong(). You make a good point, but I should mention that many of the design decisions were influenced by the way the Smalltalk libraries are designed, for better or worse. Perhaps some improvements can be made, but keep in mind that going forward there will be less of an OS specific focus and more support for cross platform features.
|
|
|
Post by Walt Decker on Jul 16, 2022 14:39:23 GMT -5
Exactly. That is why the coder should be allowed to design h/er own form windows and callback functions based on the target operating system.
|
|
|
Post by Carl Gundel on Jul 17, 2022 5:50:22 GMT -5
Exactly. That is why the coder should be allowed to design h/er own form windows and callback functions based on the target operating system. Pretty sure that is the opposite of what I said, Walter. There will be less emphasis on OS specific features, and more focus on generalities.
|
|