Allowing child HWND to be shared across multiple processes

Stefan Dösinger stefandoesinger at gmail.com
Fri Mar 25 11:10:55 CDT 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I don't have an answer to your question, but I want to make sure you
get some reply. This mailing list is the correct place to ask, and the
lack of replies most likely means that nobody else knows what could be
wrong in your case.

Did you already try to run this application on Wine? If you did, and
it doesn't work (I assume that otherwise you wouldn't have sent a
mail), can you describe what goes wrong? (e.g. "GetDC on the remote
HWND fails", or function XYZ crashes).

You observed correctly that only top level windows in Wine have a
matching X11 window. Child windows are managed purely in Wine. The
reason for this are some message handling differences between Windows
and X11.

Generally cross-process HWND access should work on X11 (but afaik not
on OSX, but that knowledge is about 7 years old). There are plenty of
applications that do this kind of thing. Though it is certainly
possible that child windows are a case that's rarely used. (Though I
think Google chrome draws tabs in separate processes, and I'd assume
they're child windows...)

Cheers,
Stefan


Am 2016-03-22 um 19:18 schrieb Brandon Adkins:
> 
> Hi guys.
> 
> If this is the wrong forum for this question, please direct me to
> the correct one.
> 
> I am working on porting a Windows application over to Linux, and my
> hope is to use Wine to make that go as quickly as possible. In my
> research, I have found one possible hangup, and hopefully you guys
> can answer it in a few minutes, vs the week or so of work for me to
> test it out myself.
> 
> Long story short, I have an application which creates child HWNDs.
> The application also launches separate processes. When WM_PAINT
> messages come in for those child HWNDs, it passes the HWND to one
> of the other processes, and that other process is the one that
> actually draws on it.
> 
> This works great on Windows. But I have found out that Wine only
> makes XWindows for top level HWNDs. So my question is: Can an
> application in wine perform operations (like drawing, BitBlting)
> onto a child HWND owned by another process?
> 
> Any tips or guidance you can give will be greatly appreciated.
> 
> Best regards!
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJW9WMPAAoJEN0/YqbEcdMwz38QAJhG0VVenZ7V15njKS2aDRW0
yG6Ba5HBSksirHrN45xl0QS3GxeoAhsXvUBc2USDZH4UjLr6fFR2R1sN7ZNIGe2T
FXIFEtayiyD5SJuJqr7Rjy9Riauoi33rCNklI16p180zNA/5CKWHHfDKF662P8L4
Qa7Md/IYIPuWhelntXz0wVj0wtBDbx5K7qTpAjRWvv6KZ4VRggC9JJM3k0srD3cD
NcCmTT9KbzzvURdA1JXftUJAdi09nXM3Et0eCeOmdKL+GYHbAFC/+oARggSoOHmT
GVfSPNNlNRZfnu0vtQu6VaQOVUlRmmPD/HVVVD3015OE8DXbUjfsFxqLQXLnBzq3
98cfuEbkMs69oWEdT4nzNJi6Uu92roU0g1t1WswNK7AEhbpw7LIPvpKTrRhCu4Rn
Fykjj+l4S8rZPNg2n770ge0Pkf7AFFAZtYmk6vFz55J2Peb2v+a68fA36LrgXeBZ
r05RWlLqMSM5A0c+WVm/MojvpxvFwPk0tW4kZ2s7jSaxzMp2oIwm5QNO+Y89i/zV
/AEP0sSHB/XM5DfgK9NZ9xa3noLinjnPrxkb27kiEOedb40QBQCiF1Iyn29xUKqk
Qa2EGkUvnOhbxee9kaTm4FnCDJwaoWW9vF6a970xcEvQ30x1ZKgbK6Y75WJEDV3l
iPaWI05/lzpBu3FR9M39
=sCxd
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list