Onecore

  • Home
  • About
  • Advertise
  • Archives
  • Privacy Policy
  • Contact

Creating Standalone Graphics Programs for Turbo C++

software templates

I have already writtern some Turbo c++ graphics articles in two part series (1 & 2)this article will cover it up as creating stand alone for the programs we have written in previous articles.Update to this article will tell you how to achieve this within the software.So allow some time for the post update,till then you can read the rest.Creating standalone programs that will run on any machines is easy.

Check the installation video for Turbo C++ 3.0 on Modern Windows OS (64-bit)

There are three steps:

  • First you insert it into source file certain functions to register the drivers and fonts you use.
  • Second you convert any BGI or CHR files your programs needs to .OBJ files.
    And third you need to link these .OBJ files to your programs using the Turbo C++ project facility.

Register Fonts & Drivers

In order to let your program run on any machine requires registering graphic driver.
Two functions are used for this purpose.The registerbgidriver() function registers drivers
like CGA.BGI and EGAVGA.BGI.

Here is the example of to register the BGI driver.

registerbgidriver(EGAVGA_driver);  // register GRAPHICS driver

int driver,mode;
driver=EGA;
mode=EGAHI;
initgraph(&driver,&mode,” “);// inittialize graphics systems
Here initgraph() function doesn’t require pathname once graphics driver is registered.

Simmilarly you can even use function
registerbgifont(arial_font); //register BGI font
Now once you have written your .BGI file,you need to convert it into the .CHR  file to be linked into application.Go into the DOS shell and then type “bgiobj”
e.g.

c:>bgiobj egavga

Here egavga is the object file you created (EGAVGA.BGI].Now you are ready to build your  project.After building the project,linking and loading will be carried out and then you can see the exe of your project.You can run the executable on any windows machine.

Turbo C++ Build/link procedures will be added later in the article.

Hope this helps.If you have any questions,post them.

Comments

  1. Protik Maitra says

    November 3, 2007 at 11:50 PM

    Wonderful. I never imagined that someone would still have details about the highly efficient, albeit ancient, Turbo C++ graphics and have them posted on the internet.

    Thanks and lot and wish you all the best!

software templates

Featured Articles

  • Sample Test Cases for Calendar App
  • Sample Test Cases for Dialog Box
  • Test Cases for Amazon Login Screen Page
  • Sample Test Cases for Online Editor
  • Sample Test Cases for Online Book Shopping

WPForms

ENDORSEMENT DISCLOSURE: In order for us to support our website activities, we may receive monetary compensation or other types of remuneration for our endorsement, recommendation, testimonial and/or link to any products or services from this website.

Copyright © 2021 . This website uses cookies to ensure you get the best experience on our website.