Hi all from a newbie,
Can I have a window that cant' be changed in size?
Regards,
Ivan
Compiling to a fixed size window
-
- Posts: 127
- Joined: Tue 07 May 2019, 16:47
Compiling to a fixed size window
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. C++ in 2021.
-
- Posts: 58
- Joined: Tue 03 Apr 2018, 19:34
Re: Compiling to a fixed size window
From the manual.
Hope this helps you.
Svein
Edit: If you are using BB4W
Hope this helps you.
Svein
Edit: If you are using BB4W
Fixing the window size
Normally the user can re-size the output window by dragging the side or corner to a new position. However there may be circumstances when you would prefer to fix the window size, and prevent it from being changed by the user. You can do that as follows:
GWL_STYLE = -16
WS_THICKFRAME = &40000
WS_MAXIMIZEBOX = &10000
SYS "GetWindowLong", @hwnd%, GWL_STYLE TO ws%
SYS "SetWindowLong", @hwnd%, GWL_STYLE, ws% AND NOT WS_THICKFRAME \
\ AND NOT WS_MAXIMIZEBOX
MODE 8
If necessary change the MODE 8 to whichever MODE is required, or replace it with a suitable VDU 23,22 command. It is important to execute a MODE or VDU 23 statement after changing the window style.
-
- Posts: 127
- Joined: Tue 07 May 2019, 16:47
Re: Compiling to a fixed size window
Hi Svein,
Thanks.
Had just found it on page 656 and in the program "Just a spinning BB4W graphic.bbc".
Boiled it down to:
SYS "GetWindowLong", @hwnd%, -16 TO ws%
SYS "SetWindowLong", @hwnd%, -16, ws% AND NOT &40000 AND NOT &10000
MODE 8
or from "Just a spinning BB4W graphic.bbc"
SYS"GetWindowLong",@hwnd%,-16TOW%
SYS"SetWindowLong",@hwnd%,-16,W%AND&FFFAFFFF
VDU23,22,512;512;8,16,16,0
Exactly as you described VDU 23 or MODE 8.
I have just started programming again after 30 years. I had a BBC Model B which I used a lot. Programmed in Basic of course and 6502 assembler. Pascal and Comal.
I'm satisfied with this solution.
I have sniffed to C++ and if I remember correctly the Windows buttons disappeared except close x
Thanks.
Had just found it on page 656 and in the program "Just a spinning BB4W graphic.bbc".
Boiled it down to:
SYS "GetWindowLong", @hwnd%, -16 TO ws%
SYS "SetWindowLong", @hwnd%, -16, ws% AND NOT &40000 AND NOT &10000
MODE 8
or from "Just a spinning BB4W graphic.bbc"
SYS"GetWindowLong",@hwnd%,-16TOW%
SYS"SetWindowLong",@hwnd%,-16,W%AND&FFFAFFFF
VDU23,22,512;512;8,16,16,0
Exactly as you described VDU 23 or MODE 8.
I have just started programming again after 30 years. I had a BBC Model B which I used a lot. Programmed in Basic of course and 6502 assembler. Pascal and Comal.
I'm satisfied with this solution.
I have sniffed to C++ and if I remember correctly the Windows buttons disappeared except close x
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. C++ in 2021.