Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: MDI script example with some API usage

  1. #11
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: MDI script example with some API usage

    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

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: MDI script example with some API usage

    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

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Script to retrieve each process CPU usage
    By Petr Schreiber in forum Real world situations and solutions using thinBasic
    Replies: 5
    Last Post: 16-04-2011, 11:52

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •