If you don't have a window to SendMessage to, you can send the message to all top-level windows :
Code:
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM)2 );
or, you can also use GetDesktopWindow to send message to the desktop window.

Hope that would be helpful