I thought this would be simple but I seem to have myself confused. I have been learning C++ for some time now and thought I was getting the hang of it. I have moved over to the 'Visual' aspects of it, specifically MFC.
Basically I'm trying to pass a variable from a DLL into a simple static text box on a MFC application.
( This is a plugin for the game rFactor )
This is the code I have in the DLL file ( .hpp )
struct TelemInfoBase
{
float mEngineRPM; // engine RPM
}
And this is the code to put it into the Static text
SetDlgItemText(IDC_DRIVER_NAME, TelemInfoBase::mEngineRPM);
But I'm getting a 'illegal reference to non-static member' error
I assume I have to define a variable for the data to be stored in and then access that variable, but I can't quite get my head around how to do that.
Would anyone care to point me in the correct direction?