Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1997-11-30
2
Medium Priority
?
515 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 40 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

705 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