J
jdk0118
So I am making some code that shows your mouses X and Y coordinates.
As of now I am doing it via command line and I have to press enter.
How would I got about putting it in a MessageBox() ?
I tried it but I can't put the variable in..
Any help would be appreciated.
This is what I have so far..
#include <iostream>
#include <windows.h>
int main()
{
while(1)
{
POINT cursorPos;
GetCursorPos(&cursorPos);
float x = 0;
x = cursorPos.x;
float y = 0;
y = cursorPos.y;
system("cls");
std::cout << "X: ";
std::cout << x;
std::cout << "\n";
std::cout << "Y: ";
std::cout << y;
std::cin.get();
}
return 0;
}
As of now I am doing it via command line and I have to press enter.
How would I got about putting it in a MessageBox() ?
I tried it but I can't put the variable in..
Any help would be appreciated.
This is what I have so far..
#include <iostream>
#include <windows.h>
int main()
{
while(1)
{
POINT cursorPos;
GetCursorPos(&cursorPos);
float x = 0;
x = cursorPos.x;
float y = 0;
y = cursorPos.y;
system("cls");
std::cout << "X: ";
std::cout << x;
std::cout << "\n";
std::cout << "Y: ";
std::cout << y;
std::cin.get();
}
return 0;
}