function to forms
OK, now i think im ready to take the step from console to GUI.
i have Borland Builder 5 and a couple of after market books about it, i create a very cool looking form with buttons and icons and all of that stuff BUT none of these books explain how to add a function calls or code to a button or any of the rest of the items on the form (except the stuff they provide with thier package).
And i still cant figure out what it means by
__fastcall in the code window.
are any of you folks Borland gurus that can point me in the right direction?
The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible (from msdn). I seem to recall reading somewhere or other that this could improve execution speed, but I do not know whether this is observed in practice. Perhaps someone else can clarify that point.
I used a version of Borland Builder a while ago (I have the free cmd line tools which are the heart of Builder 5) and seem to remember there were 'property' windows. For message processing there may be tab on the property wnd with a whole bunch on fns that start with 'On' eg OnPaint. You could always try right-clicking on a control and see whether the context menu has options for adding fns.
B. Builder uses the vcl - the visual component library; I think all class objects start with the letter 'T' (like TForm, TButton, TApplication etc).
As for adding fns yourself you do that in the code wnd (cpp), declares in header(h or hpp?) - there should be an option in one of the menus (project?) for displaying project files (units?) . When you create a project (bare form), the ide will create some basic units for you. I think one will declare an object of type TForm so look for that. Any controls you place on your 'form' will be declared here too eg TButton as part of the TForm object. There may well be a file(unit) with the WinMain fn; all it does is initialise a TApplication obj within a try...catch block - but at least you can get easy access to WinMain if you need to (mfc makes access to WinMain near impossible).
I seem to remember Builder having fairly extensive help files and a couple of 'how to's'
This is all vague for me because it's a long time since I used Builder (older version too) so hopefully someone who actually uses it may be able to provide more info and perhaps some links.