I think you missed a parameter there somewhereCode:MessageBox(NULL, buffer,MB_OK | MB_ICONINFORMATION);Also, it's a better idea to use _snprintf as this prevents you overrunning a buffer:Code:MessageBox(NULL, "Hello", buffer, MB_OK | MB_ICONINFORMATION);One thing about prefixes -- if you're going to use them, then the official prefix for int is i. sz is for NULL-terminated strings.Code:TCHAR pcBuffer[100]; _sntprintf(pcBuffer, 100, Your computer has been on for %d minutes", szTickCount);





Reply With Quote