Author |
Topic: MULTIWIN libary updated (Read 769 times) |
|
rtr
Guest
|
 |
MULTIWIN libary updated
« Thread started on: Aug 4th, 2014, 10:50am » |
|
I have updated the MULTIWIN library to v2.1. It may be downloaded from here and should be copied into your LIB folder (administrative privileges will be required).
This version has added support for initialising 'graphicboxes' (custom BBC dialogue controls).
Richard.
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: MULTIWIN libary updated
« Reply #1 on: Sep 29th, 2015, 09:37am » |
|
I *presume* this is a reference to FN_initctrl, which takes three parameters. I can't find any reference to this function in the Help files.
I'm guessing that D% is the dialog box handle, I% is the icon number, but N% has me baffled. Anyway, where do you set the size of the icon?
Richard can be terribly cryptic at times.
|
|
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: MULTIWIN libary updated
« Reply #2 on: Sep 29th, 2015, 11:40am » |
|
Hi Ken,
It's explained on the wiki:
http://bb4w.wikispaces.comCreating+a+custom+graphics+control
FN_initctrl allows you to insert a BB4W window as a control in a dialogue box:
"The parameters passed to FN_initctrl are the dialogue box pointer (as returned from FN_newdialog), the ID number assigned to the control (as specified in the call to PROC_dlgctrl) and the window number (between 1 and the number specified in the call to PROC_multiwin)".
Best wishes,
D
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: MULTIWIN libary updated
« Reply #3 on: Sep 29th, 2015, 6:22pm » |
|
Ah, thanks.
I wonder if there is any practical limit on the number of windows one can have? I have 9 in the program I am currently writing and if I were to add in one or two in a dialog box that would bring it up to 11, and so on.
|
|
Logged
|
|
|
|
sveinioslo
Developer
member is offline


Posts: 64
|
 |
Re: MULTIWIN libary updated
« Reply #4 on: Sep 29th, 2015, 7:35pm » |
|
Why don't you try this and find out for yourself ;D
Close with ALT-F4 Code: REM Close with ALT-F4
INSTALL @lib$+"WINLIB5A"
INSTALL @lib$+"MULTIWIN"
SYS "GetSystemMetrics", 0 TO xscreen%
SYS "GetSystemMetrics", 1 TO yscreen%
Max%=1000
PROC_multiwin(Max%)
ON CLOSE PROCcleanup : QUIT
FOR I%=1 TO Max%
hw1% = FN_createwin(I%, "Window "+STR$I%, X%, Y%, 100, 100, 0, &96C00000, 0)
X%+=30 : IF X% >=xscreen%-100 THEN X%=0 : Y%+=100
IF Y%>yscreen%-100 THEN Max%=I% : EXIT FOR
NEXT I%
REPEAT
FOR I%=1 TO Max%
PROC_selectwin(I%)
COLOUR RND(15)-1
PRINT '"Hello world!";
NEXT I%
WAIT 20
UNTIL FALSE
DEF PROCcleanup
PROC_selectwin(0)
FOR I%=1 TO Max%
PROC_closewin(I%)
NEXT I%
ENDPROC
Svein
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: MULTIWIN libary updated
« Reply #5 on: Sep 29th, 2015, 8:02pm » |
|
He he! Very clever. I got up to 610 on my computer and presumably it could have gone further if there had been more room on the screen.
Still, if those windows were larger, things might have been a little different. I'm intrigued by the comment someone made about a window having a bitmap - and bitmaps take up memory.
|
|
Logged
|
|
|
|
|