Python COM and bitmap Resource ID's

Markus Wankus markus_wankus at hotmail.com
Sun Jan 12 17:13:01 CET 2003


Hmmm....looking through the win32ui documentation, I thought maybe 
something like:

win32ui.SetResource(win32ui.LoadLibrary('some_dummy_dll_with_bitmap_resources.dll') 
)

...might do the trik.  It doesn't appear to work.  Does anyone know if I am 
tryiing to do something that is not possible?

Thanks,
Mark.

On Sat, 11 Jan 2003 18:38:22 -0500, Markus Wankus 
<markus_wankus at hotmail.com> wrote:

> Hi everyone,
>
> I am playing with Python and COM (win32all).  I have gotten farthan than 
> I would have thought myself capable of getting.  My ultimate goal is to 
> use my Python COM server to create a custom toolbar, which will lauch 
> pure Python scripts inside the app I am customizing.
>
> Well, the app I am working with provides this functionality through the 
> following API funtion:
>
> AddToolbar ( Cookie, Title, SmallBitmapResourceID, LargeBitmapResourceID, 
> MenuPositionForToolbar, DocumentType )
>
> Where you must specify the resource ID's of the large and small bitmap.  
> Normally these are within the .dll calling the AddToolbar function, but I 
> don't have a .dll - I have Python!  Is there any way to fool this into 
> grabbing a bitmap from somewhere? i.e. - Can you create a resource out of 
> a bitmap on the fly with the win32all extensions or something?




More information about the Python-list mailing list