Thread: function to forms

  1. #1
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    function to forms

    howdy,
    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?

    Thanks
    M.R.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    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.
    Last edited by Ken Fitlike; 02-01-2002 at 10:21 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM