Re: Re: ctmswgui vs ctypes-0.6.0

Robin Becker <[email protected]> Tue, 6 May 2003 20:25:38 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
In article <[email protected]>, Thomas Heller <[email protected]>
writes
>Robin Becker <[email protected]> writes:
>
>> The window proc functions are all declared thusly
>>                 class WINDOWPROC(CFunction):
>>                         _types_ = "iiii"
>>                         _stdcall_ = 1
>> 
>> Does this have to be 
>> 
>> WINDOPROC=WINFUNCTYPE(c_int,c_int,c_int,c_int)?
>> 
>
>
>WINDOPROC=WINFUNCTYPE(c_int, c_int,c_int,c_int,c_int)
>
>*five* c_int's as parameters, the first one is the result type.
>
>Although I'm never sure whether to use c_int, c_uint, c_long, or
>c_ulong. Hopefully it doesn't matter too much.
>
>Thomas
>
>
OK we have a restype as well now, thanks. Do we have the ability to do
this still?

SetWindowPos = user32.SetWindowPos
SetWindowPos.restype = not_null

where not_null is a function that takes a single value argument.
-- 
Robin Becker


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com