Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ 6 with MFC

Status
Not open for further replies.

mikepayne85

Programmer
Jul 6, 2005
1
GB
Hello all. I'm new to these forums and Visual C++ programming. I know Java and some other languages so I should understand most of the concepts, but I'm having a few problems. First off, what should I use to make a decent, fairly large application program for Windows? I've used VB for years and my project is getting too big for it now, and compiled programs just aren't fast enough. And i don't want to use VS.NET because of the framework being required on the users' machines.

Assuming I have chosen correctly, VC++ 6...

Is MFC the way to go? what is the alternative?

Finally, i have a CDialog and want to simply change its size, but eve n that seems beyond me. I tried creating a global variable (a pointer to a CDialog object) which is set to point to the dialog when it is created. However, the compiler still says that the pointer variable is an undeclared identifier.

Any help would be greatly appreciated. I have numerous books on VC++ but I can't find this in any of them. Thanks a lot everyone, I hope i haven't broken rules or annoyed anybody, i'm new here.

Regards
Mike Payne
 
You have 3 options:

SDK - System Development Kit
MFC - Microsoft Foundation Classes
WTL - Windows Template Library (download version 7.0 from Microsoft website)

The SDK is the bare bones version. MFC is a bunch of classes and macros built on top of the SDK. Macros are used to get around deficiencies in the early compilers (try catch, rtti etc) and to make repetitive programming a bit simpler. WTL is a templated version of MFC with some of the parameters switched round.

The problem with MFC is that the library is included in every program and it is massive. This has to be in your deliverables. If you build without the library, the executable is massive. It includes everything: even the stuff you don't need. MFC is a bit quirky. It is OK for straightforward stuff but when you get to multiple DLLs, it starts getting silly.

SDK and WTL versions do not need the MFC library. In fact, WTL is just a bunch of wrappers using the SDK and you can see the source code in the include files. Having said this, there aren't a lot of articles on SDK and WTL (see for articles on WTL). WTL is very much like MFC but without the baggage. It only includes what is required. Remember to change the include paths once you've installed it.

Watch out for which version of explorer you have installed. They will affect the controls. If it is below version 5, there may be problems with some of the more advanced controls like property sheets and spinboxes.

Start with a simple program using the wizard. Compile it and see if it works. You can do this in SDK, MFC or WTL.

To resize your dialog use eithe MoveWindow or SetWindowPos on the WM_INITDIALOG message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top