473,589 Members | 2,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MFC Integration/Migration

Hi!

I have an MFC application that is under development in VS2003 and frankly
MFC seems difficult to use and poorly documented -- I frequently find the
only way to get example code is on the Internet, not in the huge, mosly
useless "MSDN Library". For example, I was advised to use CStatic for
drawing some color frames / backgrounds, but CStatic isn't on the Toolbox and
for those related components such as Picture, limited frame colors and no
background color property is exposed -- drawing a colored background takes a
PhD in MFC (greyed out macros everywhere -- yuck!!).

How can I gracefully migrate the unmanaged C++ MFC GUI and business logic to
integrate with C++/CLI (and C#) and Windows forms. Unfortunately, I'm stuck
with production quality requirements that eliminate VS 2005 for this
development cycle. Should I wrap the old C++ code and use a C# application
or vise-versa? Should I re-write the MFC GUI, which consists mostly of
customized user drawn buttons, or should I wait for MFC with Windows Forms
classes -- any suggestions to alleviate my VS2003/.NET 1.1 restriction would
be appreciated.

Thanks for any advice!
--
Dave Boyd
Nov 17 '05 #1
3 1963
Hi Dave,

You are right that MFC takes some time to learn, but you can drop a static
from the toolbox. You just need to assign it an ID since the default ID
is -1 assuming you are just putting in a static label. That can be done
easily in the properties. There are also tons of books written on MFC that
help overcome some of the problems of the documentation.

That said, I think some of the new stuff coming in 2005 will help you with
the migration to managed. I'm looking forward to working that direction as
well.

Tom

"daveboyd" <da******@noema il.nospam> wrote in message
news:67******** *************** ***********@mic rosoft.com...
Hi!

I have an MFC application that is under development in VS2003 and frankly
MFC seems difficult to use and poorly documented -- I frequently find the
only way to get example code is on the Internet, not in the huge, mosly
useless "MSDN Library". For example, I was advised to use CStatic for
drawing some color frames / backgrounds, but CStatic isn't on the Toolbox
and
for those related components such as Picture, limited frame colors and no
background color property is exposed -- drawing a colored background takes
a
PhD in MFC (greyed out macros everywhere -- yuck!!).

How can I gracefully migrate the unmanaged C++ MFC GUI and business logic
to
integrate with C++/CLI (and C#) and Windows forms. Unfortunately, I'm
stuck
with production quality requirements that eliminate VS 2005 for this
development cycle. Should I wrap the old C++ code and use a C#
application
or vise-versa? Should I re-write the MFC GUI, which consists mostly of
customized user drawn buttons, or should I wait for MFC with Windows Forms
classes -- any suggestions to alleviate my VS2003/.NET 1.1 restriction
would
be appreciated.

Thanks for any advice!

Nov 17 '05 #2
Dave,

There is a tool to migrate the GUI portion of an MFC app. It will
migrate any dialogs/views and common controls you have. It's called RC
Converter (www.dudelabs.com). You could use that to migrate the GUI
portion. Then you could wrap the C++ business logic in a COM or
managed code wrapper. If you don't like MFC I don't know that I would
wait for MFC support of WinForms (which is in 2005).

Alex

daveboyd wrote:
Hi!

I have an MFC application that is under development in VS2003 and frankly
MFC seems difficult to use and poorly documented -- I frequently find the
only way to get example code is on the Internet, not in the huge, mosly
useless "MSDN Library". For example, I was advised to use CStatic for
drawing some color frames / backgrounds, but CStatic isn't on the Toolbox and for those related components such as Picture, limited frame colors and no
background color property is exposed -- drawing a colored background takes a
PhD in MFC (greyed out macros everywhere -- yuck!!).

How can I gracefully migrate the unmanaged C++ MFC GUI and business logic to
integrate with C++/CLI (and C#) and Windows forms. Unfortunately, I'm stuck
with production quality requirements that eliminate VS 2005 for this
development cycle. Should I wrap the old C++ code and use a C# application
or vise-versa? Should I re-write the MFC GUI, which consists mostly of
customized user drawn buttons, or should I wait for MFC with Windows Forms
classes -- any suggestions to alleviate my VS2003/.NET 1.1 restriction would
be appreciated.

Thanks for any advice!
--
Dave Boyd


Nov 17 '05 #3
Hi Dave,
I have an MFC application that is under development in VS2003
and frankly MFC seems difficult to use and poorly documented.
Besides the MSDN MFC documentation, I suggest you could also take a look on
the well-known MFC book <<Programming with Microsoft Visual C++
..NET,>>(Sixth Edition(MS Core Reference) / by George Shepherd), it will
provide you the basic and general knowledge about MFC programming in
VC.NET.

How can I gracefully migrate the unmanaged C++ MFC GUI and
business logic to integrate with C++/CLI (and C#) and Windows forms.
...


I think you can also post this question in our corresponding MSDN forum,
you may get some valuable opinions there:

Visual C++ Language
http://forums.microsoft.com/msdn/Sho...spx?ForumID=96
Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2114
by: Paddy McCarthy | last post by:
Frustrated at being prevented from using Python at work I went gunning for Perl. Time to roll out some useless Google statistics to make me feel better Google Phrase count ------------- ----- "prefer perl to python" 26 "prefers perl to python" 0
4
3975
by: Abram Friesen | last post by:
Hi, I'm a developer for a software application vendor, and our application makes use of a customer-maintained Oracle 8i/9i database. We've had a customer request to support DB2 database, and I'm looking into the feasibility of migration. Our application runs on NT Server and, the DB2 database would be in some cases on a separate AIX machine, in other cases on an AS/400. There are two problems we are running into, both relating to our...
1
2056
by: sac | last post by:
I am using DB2 v8.1 on UNIX. A few weeks ago the DBAs carried out node migration activity on the database. After the node migration I observed that the queries that execute on temporary tables show extreme poor performance. One of the query was partly optimized by declaring a partitioning key on the temporary table. However it still takes longer than before the node migration. I would appreciate if I could get information on the...
1
2660
by: rob | last post by:
Dear All, I have a very small test project to convert asp to asp.net using the Microsoft/Artisan ASP to ASP.NET Migration Assistant (http://msdn.microsoft.com/asp.net/using/migrating/aspmig/aspmigasst/default ..aspx). Everything works fine when my include file is in the same directory as the asp file that includes the include file. What I am having trouble with is that the migration tool doesn't see my include file when it resids in a...
2
3263
by: Subrata | last post by:
hi, We have a two tier client server application written with Powerbuilder as the front end. Going forward, we want to move the system to a ASP.NET based application. However, the first phase of the migration path is decided to move only the UI to ASP.NET, keeping the rest of the application architecture intact. This means, the ASP.NET application need to invoke a method written in a powerbuilder component. Could anybody please share the...
1
3853
by: Bonggoy Cruz | last post by:
We have a fairly big size ASP.NET web application that was written VB.NET. We are in the process converting the web project. We used the migration wizard included in VS 2005. I followed step by step guide outlined in here: http://msdn.microsoft.com/asp.net/reference/migration/upgrade/default.aspx?pull=/library/en-us/dnaspp/html/webprojectsvs05.asp. I was able to convert the project without any problem. Compiling and building them is...
6
2998
by: Chas Emerick | last post by:
This may seem like it's coming out of left field for a minute, but bear with me. There is no doubt that Ruby's success is a concern for anyone who sees it as diminishing Python's status. One of the reasons for Ruby's success is certainly the notion (originally advocated by Bruce Tate, if I'm not mistaken) that it is the "next Java" -- the language and environment that mainstream Java developers are, or will, look to as a...
1
2403
by: YellowfinTeam | last post by:
Marketplace: Yellowfin reporting 3.1 with BIRT Integration Yellowfin is proud to announce the release of 3.1. The major theme of this release is enhanced integration capability. We have introduced a range of new web services and authentication processes that allows for Yellowfin to be integrated into any environment with ease. These changes include: * Single signon capability
3
4626
Frinavale
by: Frinavale | last post by:
I have been researching the best approach to migrating a VB6 application into a VB.NET application. There is a lot of information out there but most of it recommends that you "train in the migration process before jumping into it". One site even recommends that this training process should take at least 2-3 weeks. I'm not sure how you can train for such a process...but maybe I'll find something while I'm researching. I was wondering if anyone...
0
7931
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7865
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8233
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8224
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5399
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3849
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3889
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2374
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1461
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.