473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to program for the Windows OS?

114 100+
How does it work?
How do you go about using the code.
I have VC++ 6
Jul 30 '07 #1
7 1494
sicarie
4,677 Expert Mod 4TB
How does it work?
How do you go about using the code.
I have VC++ 6
I'm sorry, I don't understand your question. Are you talking about using the compiler, or how to execute your compiled code?

Please have a look at our Posting Guidelines.
Jul 30 '07 #2
Firecore
114 100+
How do you actually make the code?
I mean.. how do you make windows and stuff?
How do you set out the code?(eg do you use void main{} ?)
Jul 30 '07 #3
sicarie
4,677 Expert Mod 4TB
How do you actually make the code?
I mean.. how do you make windows and stuff?
How do you set out the code?(eg do you use void main{} ?)
Ah! Ok, thanks for the clarification. You actually use int main, but that's another issue. What you are looking for is the Win32 API. Don't be confused if you see MFC, this is an extension of it.

I'm not a Windows guy, but I'm sure you could find some good resources by doing a Google search of "c++ win32 api tutorial".

PS - I'm going to edit the thread title to better describe your issue - maybe someone else will come in with a really good tutorial they've found or something... Let me know if you think the title should be changed, and what you'd like it to say.
Jul 30 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
To find out how Windows code works you must:
1) learn C completely
2) read Charles Petzold's book Programming Windows.

Then you may need to:
1) learn C#
2) learn the .NET framework
3) learn C++
4) learn Visual C++.NET

But do not
1) learn MFC (it's obsolete)
2) use VC 6.0 (it has multiple service packs and some bugs were not fixed until Visual Studio.NET 2003 (version 7.0 of the compiler

The current version is Visual Studio.NET 2005 (verson 8.0 of the compiler) and this is what you should be using.

There are any number of tutorials on how to use Visual Studio but until you can write complex C programs, the features of Visual Studio are largely pointless.
Jul 30 '07 #5
sicarie
4,677 Expert Mod 4TB
But do not
1) learn MFC (it's obsolete)
Thanks, weaknessforcats, I did not know that.
Jul 30 '07 #6
weaknessforcats
9,208 Expert Mod 8TB
Thanks, weaknessforcats, I did not know that.
Yes. It was Microsoft's first attempt at C++ and all they did was wrap the Win32 API. The CWnd class has hundreds of methods, most of them virtual. Plus the class hierarchies go to nine levels.

Result: hundreds and hundreds of virtual funcitons. Which means big VTBLS. Which in a 640K machine (at the time) is a disaster.

So what MS did was disable the virtual function mechanism and had you map your own functions manually using a feature called a MESSAGE_MAP. (my stomach has just turned over again).

Then, it needed a 1MB DLL to work at run time. Let's at 52K (at the time) it takes how long to get your code running??

Then, it can only make a tradtional window that is not meant to be on the Internet.

It started out as Version 1.0 and I think it is still 1.0.
Jul 30 '07 #7
sicarie
4,677 Expert Mod 4TB
Yes. It was Microsoft's first attempt at C++ and all they did was wrap the Win32 API. The CWnd class has hundreds of methods, most of them virtual. Plus the class hierarchies go to nine levels.

Result: hundreds and hundreds of virtual funcitons. Which means big VTBLS. Which in a 640K machine (at the time) is a disaster.

So what MS did was disable the virtual function mechanism and had you map your own functions manually using a feature called a MESSAGE_MAP. (my stomach has just turned over again).

Then, it needed a 1MB DLL to work at run time. Let's at 52K (at the time) it takes how long to get your code running??

Then, it can only make a tradtional window that is not meant to be on the Internet.

It started out as Version 1.0 and I think it is still 1.0.
Wow. Way to go, redmond. I'm glad you said something, I always got the feeling that the MFC was sort of an STL-type deal - something MS created to make common tasks easier. I suppose I should sit down and play around with the Win32 API at somepoint...
Jul 30 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Roy Riddex | last post by:
Hi I'm wanting to create a cd-rom which boots automatically when it's inserted into the computer. What I hope to achieve is for a VB6 program to run automatically when the cd boots up. Can this...
4
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use...
15
by: Aubrey Hutchison | last post by:
### this will test if your version of IDLE on windows is a MATURE program design ### print "Hello world, If Python IDLE is a mature program design it will output this" Save this simple...
3
by: James | last post by:
Im having trouble building/running a program which was written under Visual Studio 2000 & .NET Framework 1.0. Im now using a new installation of .NET 1.1 with Visual Studio 2003, otherwise there...
6
by: William J. Leary Jr. | last post by:
I'm running a VB6 program, the IDE for a compiler. Paste doesn't work if the text was cut/copied from within the program. That is: 1. Cut/copy inside the program, can't paste. Program:...
8
by: Sree | last post by:
hello friends, Can i make a C program run as as background service? for eg. like the windows services we have. which are not visible on the desktop but still running behind. If there is some...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
37
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance...
5
by: =?Utf-8?B?SmFwZQ==?= | last post by:
im writing a c# console application that copies files chosen from the windows explorer. I chose the files i want to copy and then from the (right key) menu chose my program. the program starts...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.