I think your script does not adapt controls to some events, for example change of window client area.
Have you tried to SendMessage a %WM_SIZE message to main window just after you hide menu?
Hi,
In my program I wanted to allow the user/player to optionally be able to turn off the window thinbasic menubar. (see pic menuON)
The problem I get is when the menu is removed I lose the right vertical scrollbar and the statusbar is not re-shown correctly. (see pic menuOFF)
However, If i resize the window physically by even a pixel with the mouse then the display snaps back to display all controls correctly - and the problem is gone! (see pic menuOK)
Is there a way or how do I send a message event to the window callback routine to do this automatically by firing some kind of resize event that will trigger the desired effect and avoid the situation in pic menuOFF ?
Thanks.
catventure.
PS. Same thing happens if I were to invoke maximize window with;
win_show hwnd, %SW_MAXIMIZE
I lose right vertical scrollbar and statusbar not positioned properly UNTIL I use mouse on window restore button - everything now OK!
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
I think your script does not adapt controls to some events, for example change of window client area.
Have you tried to SendMessage a %WM_SIZE message to main window just after you hide menu?
Last edited by ErosOlmi; 27-01-2018 at 05:32.
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
I think the events that your main window receive when removing main menu, so the client area change, is %WM_NCCALCSIZE
More info at:
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
At receiving that events you should resize your controls over the window to adjust them to the new window client area.
That's the idea I would follow.
Let me know if it works.
If it doesn't work I need to recreate a window similar the one you have (main menu, a rich edit, a statusbar) and try.
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
Thanks Eros,
I will try a few things today and let you know.
catventure.
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
Looking better to your images, I saw that in you menu off image in reality scrollbar is there but it seems that richedit control is sized too wide and scrollbar seems just outsize the client window.
Because there is also space at the bottom, the idea is that maybe you inverted width with height when you remove menu.
NoMenu.jpg
Last edited by ErosOlmi; 28-01-2018 at 12:33.
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
The weird thing I now found is that the controls and scrollbar display exactly as they should do every time these commands for turning on and off the menu are called as I wanted... but only AFTER the first menu off call and only if I've physically resized the window even just a fraction by hand to auto-correct the display as I showed in the pics. After that the menu on and menu off commands (and also maximize window too) works fine EVERY TIME when they are typed into the lower textbox.
I'm slowly getting closer to a resolution. I'll check out the scrollbar issue you mentioned because that may be causing it...
Regards,
catventure.
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
I finally got it working now
Seems to be OK.
I didn't change much at all - just made sure the menubar was properly attached and activated during initial display and anomaly just seemed now to go away.
Thanks.
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your post.
Thanks. Yes - this works fine now in TAB text or graphic versions.
The creator can allow the player to turn the menu on/off by using the TAB language "action" commands.
All the menu options such as QUIT, RESTART, SAVE, LOAD, TRANSCRIPT ON/OFF, EXIT have equivalent text inputs that can be typed in by the player to achieve the same thing as the menu.
Regards,
catventure.
men_off_demo.jpg
Last edited by catventure; 10-05-2020 at 11:16.
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
Bookmarks