I expect there's a Windows API type thing that does it, but since I don't know what the API is and I haven't done this myself in C++, I'll keep quiet now.