Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c

windows

winapi

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?

like image 632
Sergey Avatar asked Apr 05 '11 22:04

Sergey


2 Answers

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.

like image 169
Gabe Avatar answered Sep 21 '22 20:09

Gabe


Unfortunately you can do this.

like image 42
Richard Schneider Avatar answered Sep 17 '22 20:09

Richard Schneider