BBC BASIC for Windows
« Multiple windows run from a BBC BASIC program »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:23pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Multiple windows run from a BBC BASIC program  (Read 1288 times)
simong42
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Multiple windows run from a BBC BASIC program
« Reply #4 on: May 19th, 2011, 08:40am »

I got sidetracked from this, and have only just got back to it, so forgive the time lapse.

Just to repeat the requirement : I need to have a master window, which can be used for text input and graphics display, and a couple of child windows, which should be scrollable, and which will be used solely for text output.

I'm not sure about dialogue boxes ... isn't it the case that you click on OK or some such, and the box disappears? I'd like the child windows to be on display as long as the program is running.

I started experimenting with MULTIWIN instead, and with scrolling instead, but i'm not sure if the scrolling can be set up with the child windows.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Multiple windows run from a BBC BASIC program
« Reply #5 on: May 19th, 2011, 11:08am »

on May 19th, 2011, 08:40am, simong42 wrote:
I need to have a master window, which can be used for text input and graphics display, and a couple of child windows, which should be scrollable, and which will be used solely for text output.

Sounds like a couple of scrollable Edit Boxes would be ideal. If you don't want the user to be able to modify their contents set them to Read Only. If you want to populate the edit boxes 'one line at a time' rather than all at once that's easily arranged.

Quote:
I'm not sure about dialogue boxes

There's no need to use dialogue boxes at all. Simply create two ordinary multi-line Edit Boxes (FN_editbox in WINLIB5) and you're done. If you want things like coloured text then use Rich Edit Controls instead, but that's slightly more complicated.

Quote:
I started experimenting with MULTIWIN

I don't think MULTIWIN is well-suited to your application.

Richard.
User IP Logged

simong42
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Multiple windows run from a BBC BASIC program
« Reply #6 on: May 23rd, 2011, 07:30am »

Thanks for that. I've got multiple edit windows working, but still need to get the scrolling bit done. I presume this is driven by the 'style' parameter - how can I achieve this?
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Multiple windows run from a BBC BASIC program
« Reply #7 on: May 23rd, 2011, 08:19am »

on May 23rd, 2011, 07:30am, simong42 wrote:
Thanks for that. I've got multiple edit windows working, but still need to get the scrolling bit done. I presume this is driven by the 'style' parameter - how can I achieve this?

To enable scroll bars add WS_HSCROLL and WS_VSCROLL to the style (the Add Windows Constants utility will give you their values).
User IP Logged

simong42
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Multiple windows run from a BBC BASIC program
« Reply #8 on: Jan 16th, 2012, 09:15am »

In the event, I plumped for a couple of child windows using MULTIWIN. I can position the child windows on creation - is there any way I can set the position of the parent window?
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Multiple windows run from a BBC BASIC program
« Reply #9 on: Jan 16th, 2012, 1:08pm »

on Jan 16th, 2012, 09:15am, simong42 wrote:
is there any way I can set the position of the parent window?

You can move any window using either SYS "MoveWindow" or SYS "SetWindowPos":

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633534.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545.aspx

Bear in mind that the coordinates of a child window are with respect to its parent's client area, whereas the position of a top-level window is set in screen coordinates.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls