Jason,
I've created a new example of the script in which you can create any number of child windows everyone without any need to create an array of windows.
Every child window will have its own set of information about grid, snap to grid, and other info ...
So every window have its own life and state.
All child windows will respond to MDI commands to cascade, tile and more.
I cannot post it right now but I have to update again thinBasic 1.7.0.0 because there was a bug when passing UDT structures to API function. Now I've fixed it. I will upload a new version by tomorrow and post also new script.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Jason,
have a look at "MDI_Test_DialogEdit.tbasic" script in \thinbasic\samplescripts\UI\MDI\ directory in thinBasic preview version 1.7.0.0 refresh 20081101
I've implemented all the standard MDI window positioning and show how to use them.
But the important thing is that I've added the possibility to have specific data for every MDI window using an UDT structure allocated dynamically when each MDI child window is created (and deallocated when it is closed). Each window UDT in stored in one of the window user data and used with a pointer to it when inside the window callback. The whole process is very fast and also open the road to many personalized MDI child windows. The method is the same used when createing new windows controls or used in real compiled applications.
Regarding you indication of menu items disabled/enabled, I've checked many applications in C and other compiled basic and that job is usually a programmer responsability and not automatic by the windows MDI engine. So you (the programmer) have to add code that check MDI child activity and activate/deactivate relevant menu items.
Have a look and let me know is all ok or you feel something is still missing.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks