'How to print text at different locations on the screen itself?

I would like to know how to print text in random locations on the screen itself, not in a console or something else. For example, if you're on the desktop and you run the program, it shows text at random locations with the background being your desktop.

Details:

OS: Windows 10

Edit:

I managed to print text on the screen itself with:

_In_ HDC hdcScreen
TextOutW(hdcScreen, rand() % 72 * 83, rand() % 64 * 90, L"text", 9);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source