?
Solved

Visual C++ and Windows 3.1

Posted on 1998-05-05
5
Medium Priority
?
288 Views
Last Modified: 2013-12-14
I have an application realized with Visual C++ 5.0 for Windows 95.
Then I have made a file .exe of this application.
What  can I do to run this execute in Windows 3.1 ??  
Is it possible ?? or I have to write again the application with Visual C++ for Windows 3.1??
0
Comment
Question by:gurgief
[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
  • 4
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 300 total points
ID: 1172912
answer coming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172913
If the application uses only the windows API functions that are available on windows 3.1, then the application will run under windows 3.1.  However, if you use functions that are only available on windows 95 or NT, then the program will not run.  When the user tries to run the application windows will display an error message saying that the application could not be loaded.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172914
I believe that you can use the WINVER preprocessor definition to indicate what target operating system you want.  If you set winver to 0x0310 then, the preprocessor will not include procedures that are not available on 3.1.  Thus if you try to use one of these procedures, you will get a compiler error.  You can set WINVER by placing the line

#define WINVER 0X0310

before the line where you include windows.h.  Or you can place the definition in your project settings.
0
 

Author Comment

by:gurgief
ID: 1172915
I have a Dialog Based Application composed by CBandoAppl and CBandoDlg classes
There is not included windows.h. Where I have to place
 #define WINVER 0X0310  ??
or where I have to place it in my project settings ??
thanks in advance
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172916
You must be including some file that is including windows.h.  If you are using MFC, there must be an MFC include file that includes windows.h.  Place the #define above the line that includes this file.  You could put it before the first include to be safe.

It turns out this sort of definition can't be placed in the project settings, so use the #define.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 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