[PyKDE] PyQt/Win32/ HWND

Joe Cotellese jcotellese at opgate.com
Tue Feb 26 19:55:56 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Phil,

Thanks. Your email pointed me in the right direction. I'm now passing the 
PyCObject into my DLL. For posterity, here is my solution.

>>>snip
    PyObject * po;
    PyArg_ParseTuple(args, "Oi", &po,
                     &g_sp);
    g_hwnd = (HWND) PyCObject_AsVoidPtr(po);
<<<snip

Regards,
Joe Cotellese


- --On Monday, February 25, 2002 5:14 PM +0000 Phil Thompson 
<phil at river-bank.demon.co.uk> wrote:

> Joe Cotellese wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hello,
>>
>> I'm a fairly new user of PyQT and I have a question concering PyQT under
>> Microsoft Windows. I have a Python extension DLL that makes a Win32 call
>> that requires a window handle. I understand that I can use the Qt winId
>> function to obtain the parent window handle. I've done that but am
>> unclear on how to get the value returned by winId (a PyCObject) into my
>> extension DLL. Can anyone give me any pointers?
>
> PyCObjects are designed to allow void * values to be passed between
> C/C++ extension modules - so one would hope that your other extension
> DLL would accept a PyCObject. If it doesn't, what type of object is it
> expecting?
>
> Phil
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde



- -
What is this funny PGP stuff around my message?
http://www.howstuffworks.com/encryption.htm
-----BEGIN PGP SIGNATURE-----
Version: Mulberry PGP Plugin v2.0
Comment: processed by Mulberry PGP Plugin

iQA/AwUBPHvaBOjZO3VHFsyPEQJc+ACgp3tTTLJftYWZx2vE8TF0VDg3eYQAn3lS
3WKCDeAzwF51VCEqEjs4XyNc
=Utkt
-----END PGP SIGNATURE-----





More information about the PyQt mailing list