[python-win32] Using win32 Function GetMenuItemInfo

Mark Hammond mhammond at skippinet.com.au
Sat Aug 21 01:45:41 CEST 2004


Check out win32gui_struct, and the PackMENUITEMINFO/UnpackMENUITEMINFO
functions.  You should make sure you have pywin32-202 - it has been enhanced
over the last few version.  PackMENUITEMINFO provides you with a mutable
buffer to pass to the function, and Unpack takes that same buffer
(presumably after being modified by a Windows call) and extract back the
fields.

Mark.

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Fabricio Guzman
> Sent: Friday, 20 August 2004 9:11 AM
> To: python-win32 at python.org
> Subject: [python-win32] Using win32 Function GetMenuItemInfo
>
>
> Caution: I'm as newbeeish as they come, read at your
> own risk :-)
>
> I'm trying to use the win32 function GetMenuItemInfo.
> How do I set up the fourth argument in this function.
> The documentation says the fourth argument should be
> "A string or buffer in the format of a MENUITEMINFO
> structure."
>
> I don't know what this means.  Here's what I've tried
> to no avail:
> buff = 'MyString'
> win32gui.GetMenuItemInfo(131917, 0, 57600, buff)
>
> This gives me the following error message:
> TypeError: Cannot use string as modifiable buffer
>
> Thanks in advance,
> Fabricio
>
>
>
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32



More information about the Python-win32 mailing list