Click here to Skip to main content
15,891,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is there a way to view console output in the VS ide after console program ends? Pin
Naveen22-Jan-09 2:59
Naveen22-Jan-09 2:59 
GeneralRe: Is there a way to view console output in the VS ide after console program ends? Pin
James R. Twine22-Jan-09 10:56
James R. Twine22-Jan-09 10:56 
QuestionProblem with templates by porting from vs 2003 to 2005 Pin
OwenBurnett22-Jan-09 2:29
OwenBurnett22-Jan-09 2:29 
AnswerRe: Problem with templates by porting from vs 2003 to 2005 Pin
Stuart Dootson22-Jan-09 3:16
professionalStuart Dootson22-Jan-09 3:16 
GeneralRe: Problem with templates by porting from vs 2003 to 2005 [modified] Pin
OwenBurnett22-Jan-09 3:29
OwenBurnett22-Jan-09 3:29 
GeneralRe: Problem with templates by porting from vs 2003 to 2005 Pin
Stuart Dootson22-Jan-09 3:42
professionalStuart Dootson22-Jan-09 3:42 
GeneralRe: Problem with templates by porting from vs 2003 to 2005 Pin
OwenBurnett22-Jan-09 7:42
OwenBurnett22-Jan-09 7:42 
GeneralRe: Problem with templates by porting from vs 2003 to 2005 Pin
Stuart Dootson22-Jan-09 8:48
professionalStuart Dootson22-Jan-09 8:48 
OK - the error message makes sense. Lets look at the start of the definition of BEGIN_MESSAGE_MAP:

#define BEGIN_MESSAGE_MAP(theClass, baseClass) \
   const AFX_MSGMAP* PASCAL theClass::_GetBaseMessageMap() \
      { return &baseClass::messageMap; } \


Now, let's look at how NeoMule uses BEGIN_MESSAGE_MAP:

BEGIN_MESSAGE_MAP(CModWin<CDialog>, CDialog)


If we expand the start of the BEGIN_MESSAGE_MAP macro with those parameters, we get this:

const AFX_MSGMAP* PASCAL CModWin<CDialog>::_GetBaseMessageMap()
   { return &CDialog::messageMap; }


Visual C++ is quite correct - this is a template specialisation, so should be:

template<>
const AFX_MSGMAP* PASCAL CModWin<CDialog>::_GetBaseMessageMap()
      { return &CDialog::messageMap; }


I'm guessing that this is one place where VS2005 is more standards compliant than VS2003. Certainly, g++ 4.0.1 on my iBook agrees with VS2005.

What can you do about it...not sure, really. MFC was designed a long, long time before templates became common, so it's not too surprising that its infrastructure can't cope with templates. Either just go back to VS2003 for building NewMule or...mmm, make lots of changes to the code.
QuestionSetWindowText does not display char '&' Pin
Member 74686122-Jan-09 1:55
Member 74686122-Jan-09 1:55 
AnswerRe: SetWindowText does not display char '&' Pin
Nishad S22-Jan-09 1:59
Nishad S22-Jan-09 1:59 
AnswerRe: SetWindowText does not display char '&' Pin
Naveen22-Jan-09 2:01
Naveen22-Jan-09 2:01 
AnswerRe: SetWindowText does not display char '&' Pin
Member 74686122-Jan-09 2:04
Member 74686122-Jan-09 2:04 
QuestionStarting a service with standard (no admin) user rights Pin
Stefan Spenz22-Jan-09 1:26
Stefan Spenz22-Jan-09 1:26 
AnswerRe: Starting a service with standard (no admin) user rights Pin
«_Superman_»22-Jan-09 1:39
professional«_Superman_»22-Jan-09 1:39 
GeneralRe: Starting a service with standard (no admin) user rights Pin
Stefan Spenz22-Jan-09 1:54
Stefan Spenz22-Jan-09 1:54 
AnswerRe: Starting a service with standard (no admin) user rights Pin
Hamid_RT22-Jan-09 19:09
Hamid_RT22-Jan-09 19:09 
QuestionHelp with project on Visual Studio C++ 2008 Pin
Member 186284622-Jan-09 1:22
Member 186284622-Jan-09 1:22 
AnswerRe: Help with project on Visual Studio C++ 2008 Pin
Sarath C22-Jan-09 4:36
Sarath C22-Jan-09 4:36 
QuestionSetLayeredWindowAttributes and bitmaps Pin
dj440022-Jan-09 1:20
dj440022-Jan-09 1:20 
AnswerRe: SetLayeredWindowAttributes and bitmaps Pin
Nishad S22-Jan-09 1:30
Nishad S22-Jan-09 1:30 
GeneralRe: SetLayeredWindowAttributes and bitmaps Pin
dj440025-Jan-09 21:44
dj440025-Jan-09 21:44 
AnswerRe: SetLayeredWindowAttributes and bitmaps Pin
Naveen22-Jan-09 1:33
Naveen22-Jan-09 1:33 
Question.mak file generating Pin
kir_MFC21-Jan-09 23:49
kir_MFC21-Jan-09 23:49 
QuestionRe: .mak file generating Pin
Maximilien22-Jan-09 1:30
Maximilien22-Jan-09 1:30 
Questionthreads [modified] Pin
hrishiS21-Jan-09 23:47
hrishiS21-Jan-09 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.