BBC BASIC for Windows
General >> General Board >> 64bit Applications http://bb4w.conforums.com/index.cgi?board=general&action=display&num=1372755594 64bit Applications
Post by Katgooon on Jul 2nd, 2013, 08:59am
Hi everyone,
Is BB4W suitable for 64bit applications?
Thank you.
Re: 64bit Applications
Post by admin on Jul 2nd, 2013, 09:17am
It depends on what you mean by "64 bit applications". BB4W programs always run as a 32-bit process, but they will work perfectly well under 64-bit Windows (there are a couple of very minor incompatibilities that you need to be aware of).
However if you mean in the sense of having access to a 64-bit address space (i.e. the ability to address more than 4 Gbytes of memory) then, no, BB4W applications cannot do that.
When you don't need a massive address space, there is no advantage in having a 64-bit process rather than a 32-bit process. In fact 64-bit performance can actually be worse (typically when the increased code size results in less efficient cache usage).
Richard. Re: 64bit Applications
Post by Katogoon on Jul 2nd, 2013, 10:11am
Hi Richard,
Thank you for your quick response, I thought that was the case when reading the documentation as the DDL loaded are 32bit API's, I read a little about WOW64 implementation.
I have not really had much exposure to programming in the past but have learn the basics fundamentals of programming using multiple languages from Lisp, Haskell to C and Python but have always been fascinated by BASIC as it was the first programming language I have ever used.
I have never created a full application just simple text based applications there and here, I have an idea for an application that I could use in my work place within clinical trial management but I am finding the Windows API a bit daunting.
Am I not ready to progress to GUI programming yet? Re: 64bit Applications
Post by admin on Jul 2nd, 2013, 10:37am
If your primary user interface is a dialogue box then the 'community edition' dialogue editor (recently mentioned by Yee on the Yahoo! group) should make your life easier since I understand it creates template code for your application. However I don't have any personal experience of it.
Richard.
Re: 64bit Applications
Post by Katogoon on Jul 2nd, 2013, 3:31pm
Hi Richard,
After looking at these examples they don't actually refer to any function for creating a window I presume this is created automatically, is this something thats interal to BB4W only or is this how the Windows API works?
Is this documented any where for beginners like myself?
Re: 64bit Applications
Post by admin on Jul 2nd, 2013, 6:09pm
After looking at these examples they don't actually refer to any function for creating a window
Applications having more than one window are relatively rare. If you take Notepad, for example, it basically has just the one main window in which the document is displayed. The rest of the user interface consists of standard elements like menu bars, toolbars, status bars and dialogue boxes.
I would encourage you to design your application in this style if possible. Doing so has advantages both for you as the programmer and for the user, because this 'single main window' style is the basis for much of the standard Windows GUI.
If multiple windows are unavoidable then you will need to decide whether to use the old Multiple Document Interface (MDI) style of application - as typified by early versions of Microsoft Word - or to 'roll your own'. Either way it will be considerably more work than a single-window application.
Richard.
Re: 64bit Applications
Post by DDRM on Jul 4th, 2013, 08:29am
Hi Katogoon,
I'm guessing you may not actually have tried using BB4W yet, so some of these comments may be a bit simplistic if you have: forgive me. Why not try the trial version, and see what it can do? Then you can look at how these things work.
If you want to create a dialogue box (which is a new window in which you can place additional components, such as a text box, or buttons), have a look at the section in the manual on dialogue boxes: it's in the section on library routines.
If you want to use this approach you will need to install WINLIB2, and then use the FN_newdialog that provides - it's all pretty well explained in the manual.
You may also want to look at the section on docking a dialogue box: that way you can "attach" the new dialogue box to the main window of your application.
Having said all that, if your application is mainly text-based is there any reason you can't just use the standard BB4W output window for your output? It will run just fine, in a well-behaved window. You can later add menus, toolbars etc - look for the relevant sections of the manual. Or, once the program does what you want, and you feel more comfortable with the way BB4W works, you could convert it to use a dialogue box interface.