AM TRYING TO LOG THE KEYSTROKE BUT IT SEEMS NOT WORKING ANY HELP PLS


int main()
{
std::ofstream wiin;
wiin.open("kkk.txt");
MSG msg;
while(GetMessage(&msg, NULL,0, 0))
{
for(char i =4; i<=255; i++)
{
if(GetAsyncKeyState(i)>=0x0001 || GetAsyncKeyState(i)<=0x8000)
{

wiin<<i;
}

}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
//cout << "Hello world!" << endl;
return 0;
}
THE CODE RUNS FINE BUT THERE IS NOTHING IN THE FILE
Why are you asking on general, but not the windows board?

Everything is in MSDN.
Dozens of samples.
Topic archived. No new replies allowed.