Jump to content

winterhard

New Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by winterhard


  1. 1 hour ago, winterhard said:

    How do I pass the desired window size to, for instance, HGT's OpenTextWindow call? Any sample code would be very welcome.

    I'd better answer my own question. After studying the HGT code I found the relevant HiSoft Basic variables named windx, windy, windw and windh. Not mentioned in the manual, these determine your window size. They are set to your maximum window size by default. Define them as SHARED and use GemAES call wget to find your max window size. (For some reason HBasic's WINDOW GET does not work here.) Use this to adjust the new window to your desired size. Then call HGT's open window call. Like this:

    SUB processusermenus (VAL wind,VAL item,VAL title)
        SHARED Finished_Flag,MyWindow,whandle,windx,windy,windw,windh
    (...)
          CASE mnopen
            dum = wind_get(whandle,7,windx,windy,windw,windh)   'get screen size
            windw=windh                                         'make the new window square
            whandle=OpenTextWindow("Your window title",win_all-win_info)   
            init
        END SELECT
    END SUB

    Works for me.


  2. I know this thread is five years old, so I hope there are still some HiSoft Basic users out there 😃

    I'm working on a GEM program using the HGT toolkit. Can do menus, windows, objects and the lot. Problem is, all windows open fullsize. I need windows based on screen size (I'm on a 1920x1080 screen). I know how to do it outside of HGT but then I will have to do all the event handling myself. How do I pass the desired window size to, for instance, HGT's OpenTextWindow call? Any sample code would be very welcome.

×
×
  • Create New...