Hey guys
After most of today coding my DirectX 9 Framework, I'm done! I only receive 1 error when I try to call the message wrapper function in WinMain that I can't fathom out, it's probably pretty simple but I can't get it, been a long day
Anyways, here's the error:
error C3867: 'D3D::bDisplay': function call missing argument list; use '&D3D::bDisplay' to create a pointer to member
Here is the relevant code:
DXEngine.h
D3D.hCode:#include "D3D.h" class DXEngine: public D3D { public: .... int iRunMessageLoop(bool(*)(float)); /*Function pointer to wrap the message loop*/ .... }
...and finally, here's my WinMain.cppCode:class D3D { public: .... bool bDisplay(float); /*Function to display graphics in the client window*/ .... }
WinMain.cpp
As you can see, most of the work is done in the constructors. This is most probably the hurdle that I need to get over, then my framework will work, hopefullyCode:include "DXEngine.h" /*Include the code written in the DXEngine header file*/ int WINAPI iWinMain(HINSTANCE hInstance, /*Handle to the current instance of the application*/ HINSTANCE hPrevInstance, /*Handle to the previous instance of the application - is set to NULL*/ LPSTR lpCmdLine, /*This string specifies the command line for the application*/ int nCmdShow) /*This value specifies how the window will be shown*/ { /*Application Instances*/ DXEngine EngineInstance; D3D Direct3DInstance; EngineInstance.vUpdateWindow(); EngineInstance.iRunMessageLoop(Direct3DInstance.bDisplay); return 0; }![]()



LinkBack URL
About LinkBacks






I'm doing pretty much what it says to do in my book, although I used OOP whereas the book didn't. It tells me to pass in the bDisplay() function into the message wrapper with no parameters.