Link to home
Start Free TrialLog in
Avatar of b_harpal
b_harpal

asked on

Converting 16-bit 'C' to 32- bit c++/vc++..??

Hi,

I have an application code written in 'C' for DOS.
Now i want to port this code for windows OS. There are quite a few hurdles. First the entire code is very vast.
2) VC++ compiler does'nt support lots of 'C' header files.

Any suggestions..????

Avatar of b_harpal
b_harpal

ASKER

The application is graphics based..
i would suggest that u start converting your structured C code into object oriented C++ code first and then use MFC in VC++ and then proceed with debugging n stuff

cryptosid
ASKER CERTIFIED SOLUTION
Avatar of CoolBreeze
CoolBreeze

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your application works directly with hardware (graphic card) then you will have alot of problems with win2k. You'll need to convert all the graphics to work with the windows drivers (and directx).
that's y i suggest the above steps, by abstracting it then rewriting it in win32
It uses Graphics VGA as shown below.
Is it that i really don't have any other option left..??


Cheers

harry

void Initialize(void)
{
  int xasp, yasp;               /* Used to read the aspect ratio*/
  registerbgidriver( EGAVGA_driver);     /* egavga driver linked in */
  registerbgifont(small_font);           /* Stroked font linked in */

  GraphMode = VGAHI;
  GraphDriver = VGA;
  initgraph( &GraphDriver, &GraphMode, "" );
  ErrorCode = graphresult();          /* Read result of initialization*/
  if( ErrorCode != grOk ){          /* Error occured during init     */
    printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) );
    exit( 1 );
  }

  getpalette( &palette );          /* Read the palette from board     */
  MaxColors = getmaxcolor() + 1;     /* Read maximum number of colors*/

  MaxX = getmaxx();
  MaxY = getmaxy();               /* Read size of screen          */

}
pardon me, but y would u want to convert to windows?
This question didn't show any activity for more than 21 days. I will ask Community Support to close it unless you finalize it yourself within 7 days.
You can always request to keep this question open. But remember, experts can only help if you provide feedback to their comments.
Unless there is objection or further activity,  I will suggest to accept

    "cryptosid"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
========
Werner
thanks for accepting me :D