Pinyo's Programming and Software Notes

Friday, December 15, 2006

Start Learning MFC from the Ground Up
(Dec 15, 2006)

I start learning MFC today from the most basic things. The first things I want to make note is some simple, yet important functions:
1. TextOut() [CDC] put string to a window
2. CBitMap::LoadBitMap()
3. ShowWindow() [CWnd]
4. AfxMessageBox()

However, when I tried to build a simple MFC program, I found it was difficult to get to the point if we used 'New-project Wizard' and asked it to create MFC program. The best way for this is
  1. Start with Win32 Application
  2. Go to project properties and change 'Use of MFC' to shared or static library (depending on your own preference)
Strictness of Microsoft compiler is increased from the last few years. Old MFC books may have some codes that does not work. Most of them are string constants. We can use CString( "problematic string constants" ) to solve the problem.

0 Comments:

Post a Comment

<< Home