This is sort of confusing for me to Post, so I'll do my best and show all my code. I have two .cpp files, one that includes the other's .h file. I have defined the following member variables:
And three public member functions:
In the winmain.cpp source file I have created an object of the class CGfxOpenGL called <setOpenGL> and I wanted to run an IF statement in winmain.cpp that checks if the app is running in fullscreen (which calls to see if the user wants it to run in fullscreen) and if so apply the proceding settings, but I wanted to do the if statement like so:
But I am having the problem that I am obviously defining GetScreenMode with no arguments. So I tried specifying it as <GetScreenMode(CGfxOpenGL a)> so I could pass the function in the other function (CGfxOpenGl.GetScreenMode(
Thanks in advance
but I get an error
error C2664: 'GetScreenMode' : cannot convert parameter 1 from 'void' to 'class CGfxOpenGL
How do I have to set the passing argements?
Thanks
Code:
private:
bool m_fullscreen
And three public member functions:
Code:
void CGfxOpenGL::SetScreenMode(bool x)
{
m_fullscreen = x;
}
bool CGfxOpenGL::GetScreenMode()
{
return m_fullscreen;
}
void CGfxOpenGL::QuestionScreenMode()
{
if (MessageBox(NULL,
"Do you want to run in Fullscreen",
"FullScreen Mode",
MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON1) == IDYES)
{
SetScreenMode(true);
return;
}
else
{
SetScreenMode(false);
return;
}
}
In the winmain.cpp source file I have created an object of the class CGfxOpenGL called <setOpenGL> and I wanted to run an IF statement in winmain.cpp that checks if the app is running in fullscreen (which calls to see if the user wants it to run in fullscreen) and if so apply the proceding settings, but I wanted to do the if statement like so:
Code:
if (setOpenGL.GetScreenMode(setOpenGl.SetScreenMode()))
...
...
But I am having the problem that I am obviously defining GetScreenMode with no arguments. So I tried specifying it as <GetScreenMode(CGfxOpenGL a)> so I could pass the function in the other function (CGfxOpenGl.GetScreenMode(
Thanks in advance
but I get an error
error C2664: 'GetScreenMode' : cannot convert parameter 1 from 'void' to 'class CGfxOpenGL
How do I have to set the passing argements?
Thanks