Solved

Visual C++ 5.0 Program Structure Vs Regular C Program Structure

Posted on 1997-11-30
2
508 Views
Last Modified: 2010-05-18
I am learning windows based programming and I am having a hard time following the code on what is going on.  I have been programming in C for a bit and understand what is happening there.  For Example

#include <files here>

int main() {   //program begins
  declare variables
  call functions
  end program
}

very easy to understand.  However, in visual c++ it is a bit more elusive for me to follow.

Can someone just basically go through how it starts, creates window, handles some type of input and exits?  I am not looking for code, but just some kind of flow in more detail then above.

Thanks
Darrell


0
Comment
Question by:larockd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1174447
Are you using MFC? Are you using MFC AppWizard to create your program?
0
 
LVL 7

Accepted Solution

by:
galkin earned 20 total points
ID: 1174448
Windows application is based on message loop proccessing messages( notification that something hase happened).When you create windows application you create at least one window and define special function called window procedure callback function to be called every time some message needs processing. Each message is defined by unique ID and has two parameters through which extra data can be passed, This message loop roots data when special message is sent to the window indicating you should exit message loop, close window and appplication is terminated. This equivalent to defineing while loop in main C procedure and when condition of while statement becomes false( equivalent to window receiving close message) you exit while loop and main returns.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
thread-safe code in c++ 2 128
c++ syntax question 9 66
C++ Code Issue 4 48
find Speed using GPS latitude & longitude 4 159
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question