Sergey
Sergey

Reputation: 685

is it possible to draw on HWND created by another process?

I am creating window inside my program, then sending HWND of this window to another application. Will drawing on window's HDC be valid for another process?

Upvotes: 6

Views: 2137

Answers (2)

Gabe
Gabe

Reputation: 86718

Windows are owned by other windows, not by processes. You can draw to any HWND on your desktop (at least if the window has the same integrity -- I'm not sure what happens if they don't).

Web browsers that host plug-ins or tabs in a separate process generally make use of this functionality.

Upvotes: 5

Richard Schneider
Richard Schneider

Reputation: 35477

Unfortunately you can do this.

Upvotes: 2

Related Questions