473,320 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1950
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******@noemail.nospam> wrote in message
news:67**********************************@microsof t.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
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...
4
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...
1
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...
1
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...
2
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...
1
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...
6
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. ...
1
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.