You can directly change a variable inside a loop with C++ right?
EDIT: AHA! found some documentation on why break is fucking up for you!
Code:
break;
- the break statement gets you out of a loop. No matter what the loop's ending condition, break immediately says "I'm outta here!" The program continues with the next statement immediately following the loop. Break stops only the loop in which it resides. It does not break out of a "nested loop" (a loop within a loop).
You've got a nested loop there due to your "For xAxis" and "For yAxis" contained within that.
EDIT2: I was just thinking of a way to avoid the nested loop so that you can use break, it ain't pretty but it should work.
if(xAxis != 1366) //signifies that the do loop was exited early
{
MessageBoxA(NULL, "How on earth did you know!?", "Well done", MB_OK);
}
[/php]
EDIT3...LOL
Got the screen bounds sorted I think
[php]
int MaxX = (LONG)::GetSystemMetrics( SM_CXFULLSCREEN );
int MaxY= (LONG)::GetSystemMetrics( SM_CYFULLSCREEN );
[/php]
That's all you need pretty sure.
Will try, thanks
Originally Posted by Kallisti
Will try, thanks
NP I can't even test it haha, I'm so noob at C++ I don't even know what project type to make this
Originally Posted by Jason
NP I can't even test it haha, I'm so noob at C++ I don't even know what project type to make this
In new project wizard > Win32 Project > Make sure it's set to Win32 and not dll or whatever, Make sure you specify it to be empty. > New file under source > .cpp > code > compile.
edit: Get bounds works
oh gosh... :x
create a function and do a return; <.< simple (for the break issue, it obviously only breaks one loop )
Originally Posted by 'Bruno
oh gosh... :x
create a function and do a return; <.< simple (for the break issue, it obviously only breaks one loop )
itd still be all the same code, and since its only doing 1 thing, why make a function
[php]void shitFunction()
{
shit
}[/php]
or how about
[php]shit[/php]
wtf? why would you create a function for that.. >.< you didn't get it..