Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I am using MS visual C++...for programming...I have done applications with fork, treads , etc...I was wondering if someone could tell me what the difference if I program using the win32 project option or more exactly what is the win32 prject option and whats the difference between a windows application and a command line application that it pops out when i select win32 project
.... and how do you execute a program in win32.... I did a project in win32 with some basic code (just for the fun of learning) but when i compile i get a bunch of files and I do not know whichone of them should i execute and how...(there is no .exe file)
fgfg

Win32 applications are simply applications that run under Microsoft Windows 32 bit Operating Systems. This means that they cannot run under the Microsoft Windows 16 Bit operating systems and must be run under the 32 Bit options on Microsoft Windows 64 bit Operating Systems.
There are three types of Win32 applications you can make with C++:
1) Windows Applications (EXE)
2) Console Applications (EXE)
3) Dynamic Link Library (DLL)A Windows application is a program that compiles with the Windows Libraries so that it becomes an event-driven application that must respond to Windows Messages such as WM_CLOSE. You don't have to create a mouse because windows handles that. You don't have to program minimize, maximize, close, resize, move, etc, because that is again handled by windows (you can however, override any of these by capturing the Windows Message that pertains to that action as well as changing the type of window displayed I.E. full screen, dialog box, or no border/no title)
A Console application is a program that does not compile with the Windows Libraries and runs in a DOS box (essentially a window that contains the command interpreter). You do not (by default) have any mouse information and you typically have to interact with the user via the keyboard using commands such as CIN and COUT (Console IN and Console OUT).
A Dynamic Link Library is a program that cannot be executed alone, but instead is linked to by other applications in order to share common functionality.
The command line is the line that accepts the command. Under Windows the command line is typically hidden by shortcuts, but you can use it yourself if you wish. In addition, you can create programs that handle the command line arguments passed to it.
For example:
MyApp.exe /Debug
or
MyApp.exe /F C:\DataFile.dat /D /I
(These of couse are fictitional)Some real-life examples:
WINDOWS APPLICATION
1) Press WINDOWS KEY + R and type CMD (or COMMAND under Windows9x systems) and then hit ENTER.
2) Type IEXPLORE http://www.starshipcombatsimulator.com
3) Hit ENTER
Internet Explorer will take you to Starship Combat Simulator .com
IE is a Windows Application that handles Command Line ArgumentsCONSOLE APPLICATION
1) Press WINDOWS KEY + R and type CMD (or COMMAND under Windows9x systems) and then hit ENTER.
2) Type DIR *.JPG /B /S > JPEGS.TXT
3) Hit ENTER (wait for it to finish)
4) Type EDIT JPEGS.TXT
You will see a listing of all the JPG files on your computer. The DIR command is a directory command that lists files. I specified 5 arguments:
1) *.JPG : This searches for all files that end in .JPG
2) /B : This specifies bare format which means only the file names will be displayed
3) /S : This specifies that all files in all subdirectories should be listed
4) > : This means to redirect the output
5) JPEGS.TXT : This is the file that I want the output to be redirected into.You can create applications that handle command line args by using the following implementation of main:
int main(int argc, char *argv[])the argc is the argument count (the number of arguments your application has received)
the argv is an array of size argc that contains all the arguments received.Hope this educates and helps you some,
ChiThey mostly come at night...mostly.

![]() |
Copy and rename with a ba...
|
convert xml to pdf
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |