D
dan
I am trying to port a legacy MFC application to C++/CLI. I have
managed to build the code under VS 2008 and I am in the process of
enabling the /CLR compiler directive. My goal is to try and convert
the application to a series of Mixed assemblies that will run
under .NET.
The application makes use of Message Maps using standard MFC
conventions.
I have noticed that any Message Maps using the ON_BN_CLICKED header
directive leads to the compiler warning
C4793 function compiled as native non-clr call vcall thunks must be
compiled as native
ON_BN_CLICKED is defined as ON_CONTROL( BN_CLICKED, id, memberFxn )
and ON_CONTROL( BN_CLICKED, id, memberFxn ) reduces to
{WM_COMMAND, (WORD) wNotifyCode, (WORD) id, (WORD) id, AfxSigCmd_v,
(static_cast< AFX_PMSG > (memberFxn)) },
So there must be an issue with .NET and the WM_COMMAND statement. Is
there a stanard way to replace ON_BN_CLICKED in a .NET friendly manner
so that I can compile my ON_BN_CLICKED messag maps in C++/CLI without
the compiler warning.
managed to build the code under VS 2008 and I am in the process of
enabling the /CLR compiler directive. My goal is to try and convert
the application to a series of Mixed assemblies that will run
under .NET.
The application makes use of Message Maps using standard MFC
conventions.
I have noticed that any Message Maps using the ON_BN_CLICKED header
directive leads to the compiler warning
C4793 function compiled as native non-clr call vcall thunks must be
compiled as native
ON_BN_CLICKED is defined as ON_CONTROL( BN_CLICKED, id, memberFxn )
and ON_CONTROL( BN_CLICKED, id, memberFxn ) reduces to
{WM_COMMAND, (WORD) wNotifyCode, (WORD) id, (WORD) id, AfxSigCmd_v,
(static_cast< AFX_PMSG > (memberFxn)) },
So there must be an issue with .NET and the WM_COMMAND statement. Is
there a stanard way to replace ON_BN_CLICKED in a .NET friendly manner
so that I can compile my ON_BN_CLICKED messag maps in C++/CLI without
the compiler warning.