Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: synchronization of variables Pin
Aescleal15-Jun-10 8:58
Aescleal15-Jun-10 8:58 
AnswerRe: synchronization of variables Pin
Maximilien15-Jun-10 3:24
Maximilien15-Jun-10 3:24 
GeneralRe: synchronization of variables Pin
Niklas L15-Jun-10 3:32
Niklas L15-Jun-10 3:32 
AnswerRe: synchronization of variables Pin
Joe Woodbury15-Jun-10 6:17
professionalJoe Woodbury15-Jun-10 6:17 
Question"the attempt to edit the code in cimageDoc::OnSegManual in file--- failed" in MFC classWizard Pin
jianzhuhuai14-Jun-10 23:03
jianzhuhuai14-Jun-10 23:03 
QuestionTemplate and preprocessor macros Pin
rrrado14-Jun-10 22:35
rrrado14-Jun-10 22:35 
AnswerRe: Template and preprocessor macros Pin
Code-o-mat15-Jun-10 1:13
Code-o-mat15-Jun-10 1:13 
AnswerRe: Template and preprocessor macros Pin
Niklas L15-Jun-10 2:07
Niklas L15-Jun-10 2:07 
Goto declaration of RUNTIME_CLASS macro in afx.h and you will see something like
#define _RUNTIME_CLASS(class_name) ((CRuntimeClass*)(&class_name::class##class_name))
#ifdef _AFXDLL
#define RUNTIME_CLASS(class_name) (class_name::GetThisClass())
#else
#define RUNTIME_CLASS(class_name) _RUNTIME_CLASS(class_name)
#endif


If you have _AFXDLL defined in your project replace RUNTIME_CLASS(T) with T::GetThisClass()

Otherwise you will have a problem. The macro will expand to &T::classT which will fail, and you will need some other construct.

Edit: This might work (NOT tested)
template<class T> T* GetCell(int row,int col)
{
	return ((T*)GridCellGet(col,row,0,0,T().GetRuntimeClass()));
}


GeneralRe: Template and preprocessor macros Pin
rrrado15-Jun-10 2:56
rrrado15-Jun-10 2:56 
GeneralRe: Template and preprocessor macros [modified] Pin
Niklas L15-Jun-10 3:16
Niklas L15-Jun-10 3:16 
Question_CrtIsValidHeapPointer error Pin
chikach14-Jun-10 15:06
chikach14-Jun-10 15:06 
AnswerRe: _CrtIsValidHeapPointer error Pin
Richard Andrew x6414-Jun-10 15:52
professionalRichard Andrew x6414-Jun-10 15:52 
GeneralRe: _CrtIsValidHeapPointer error Pin
chikach15-Jun-10 5:47
chikach15-Jun-10 5:47 
GeneralRe: _CrtIsValidHeapPointer error Pin
Richard MacCutchan15-Jun-10 6:57
mveRichard MacCutchan15-Jun-10 6:57 
Questionprogramming C in Visual C++ express edition. Pin
cavemen14-Jun-10 13:56
cavemen14-Jun-10 13:56 
AnswerRe: programming C in Visual C++ express edition. Pin
Richard Andrew x6414-Jun-10 16:04
professionalRichard Andrew x6414-Jun-10 16:04 
GeneralRe: programming C in Visual C++ express edition. Pin
cavemen14-Jun-10 16:27
cavemen14-Jun-10 16:27 
GeneralRe: programming C in Visual C++ express edition. Pin
Richard Andrew x6414-Jun-10 16:36
professionalRichard Andrew x6414-Jun-10 16:36 
GeneralRe: programming C in Visual C++ express edition. Pin
cavemen14-Jun-10 16:39
cavemen14-Jun-10 16:39 
GeneralRe: programming C in Visual C++ express edition. Pin
Richard Andrew x6414-Jun-10 16:41
professionalRichard Andrew x6414-Jun-10 16:41 
GeneralRe: programming C in Visual C++ express edition. Pin
cavemen14-Jun-10 17:01
cavemen14-Jun-10 17:01 
GeneralRe: programming C in Visual C++ express edition. Pin
Cedric Moonen14-Jun-10 20:10
Cedric Moonen14-Jun-10 20:10 
GeneralRe: programming C in Visual C++ express edition. Pin
David Crow15-Jun-10 4:33
David Crow15-Jun-10 4:33 
GeneralRe: programming C in Visual C++ express edition. Pin
cavemen17-Jun-10 5:32
cavemen17-Jun-10 5:32 
AnswerRe: programming C in Visual C++ express edition. Pin
David Crow17-Jun-10 6:10
David Crow17-Jun-10 6:10 

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.