C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 2nd, 2003, 11:37 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
Question Coverting DOS programs to Windows

Since my Python application isn't working on other computers that don't have Python installed, I was thinking about starting my program in DOS (since I know C++ already) and converting it to Windows after I learn Win32. Is this a good idea? Is it easy to convert? And when I say "easy," I'm not looking or expecting a one-click converter, but I also don't want to start with DOS if it will be difficult to convert later on.
__________________
Matt

Reply With Quote
  #2  
Old March 3rd, 2003, 12:35 AM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,861 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 23 m 55 sec
Reputation Power: 462
Just throwing these thoughts out:

"DOS programs" are developed under Win32 as "console applications". Most all the resources of Win32 (if not all -- I haven't tried pushing the limits yet) are available to a console application, including multithreading and DLLs. But you would not be able to run it on a Win16 machine (eg, Windows 3.1 or a DOS machine).

The biggest difference between a console app and a Windows app is the user interface. The other main diffence is that a Windows app makes use to the Windows messaging system, which dictates the overall structure of the program. Some applications just work better as a console app and others as a Windows app. You have to decide how your program would work better.

By the same token, converting a console app to Windows would mainly mean changing the overall structure of the program, though most of the worker functions should be fairly easy to port over. For that matter, the real data/number crunching part of the program could be considered its "engine" and split off into a DLL, which then can be used equally well by either a console or a Windows app.

The other more obvious aspect of that conversion would be in changing from a console's "teletype" text interface to a GUI with menus and dialogs. Again, some applications lend themselves more readily to console apps and others to Windows. For example, I wrote a console app to test NTP and timserver servers; its command-line interface hat works just fine, but a GUI interface could be cumbersome.

In short, I would think that you should be able to port a lot of your work from the console app to the Windows app, just not much of the user interface.

Reply With Quote
  #3  
Old March 3rd, 2003, 02:18 AM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
I am developing a weather forecasting program. This is an at home project that I'm doing just to see if I can extend my programming expertise to desktop applications. Yes, this is the same program I've been talking about in other posts.

After posting this question, I thought making a console-based program wouldn't be an option since the program (text or GUI-based) needs to have internet capabilites (the forecasts are downloaded from a website). It's nice to know that most of the Win32 functions are available to console apps as well. Are all console projects automatically Win32-based, or does it depend on the compiler you're using?

You mentioned putting the heart of my app. into an engine with a dll file. Where would I find information on how to do that? I've never messed with dll's, nor have I seen any books on them. I'm pretty big on grouping like functions, classes, and commands together to make updating easier, so the dll thing sounds interesting. Also, I haven't seen any tutorials or books on making complex console apps. Can you recommend any? Thanks!

Reply With Quote
  #4  
Old March 3rd, 2003, 03:23 AM
7stud 7stud is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2001
Posts: 1,327 7stud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 44 m 50 sec
Reputation Power: 9
"You mentioned putting the heart of my app. into an engine with a dll file. Where would I find information on how to do that?"

Ivor Horton's Beginning Visual C++ has a short chapter entitled "Writing your own DLLs".

Reply With Quote
  #5  
Old March 3rd, 2003, 04:12 AM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
Quote:
Originally posted by 7stud
Ivor Horton's Beginning Visual C++ has a short chapter entitled "Writing your own DLLs".


Oh yes, I remember seeing that.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Coverting DOS programs to Windows


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT