Reputation: 508
Now I can draw over games but only if they are in window mode, i just draw on TopMost
form and set it clickable-through:
//C++ .NET 4
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
int initialStyle = GetWindowLong(this->Handle, -20);
SetWindowLong(this->Handle, -20, initialStyle | 0x80000 | 0x20);
}
But I am not able to do it if the game runs in fullscreen :(
Can I do something with fullscreen games? (with C++ if possible)
Upvotes: 2
Views: 659
Reputation: 6814
You just can't (at least that way). When the games enter full screen mode, they usually do this using low-level calls to DirectX or OpenGL, and this will disable all windowing logic of the Windows Desktop. The Game is then just drawing directly into the graphics device's framebuffer and the graphics driver will display this content on the screen - windowing is bypassed alltofether.
To really draw "over" that, you can forget all kind of WinForms/MFC calls, but you must look into low-level driver calls that would allow you to manipulate the framebuffer (though I doubt you can do this from an external process).
Upvotes: 2