1. win32lib extrra

--0-824601938-1023447675=:30978


Hi Derek,

Would it be possible to add this to the next win32lib. They are extensions to 
win32libs menu capabilities. Just spice them into win32lib language.

constant 
zSetMenuItemInfo=registerw32Function(user32,"SetMenuItemInfoA",{C_LONG, C_UINT,
C_SHORT, C_POINTER}, C_USHORT)

global procedure setMenuBitmap(integer menuitem,object bitmap)
integer bool
atom MENUITEMINFO  
MENUITEMINFO = acquire_mem(0,48)--SIZE_OFMENUITEMINFO 
mem_set(MENUITEMINFO,0,48)
if sequence(bitmap) then
bitmap = loadBitmapFromFile(bitmap)
end if
poke4(MENUITEMINFO+0,48)
poke4(MENUITEMINFO+4,#80)   --MIIM_BITMAP
poke4(MENUITEMINFO+44,bitmap)
bool = w32Func(zSetMenuItemInfo,{getHandle(menuitem),menuitem,0,MENUITEMINFO})
if bool = NULL then
warnErr("setMenuBitmap Failed()")
end if
bool = w32Func(xDrawMenuBar,{getHandle(menuitem)}) 
release_mem(MENUITEMINFO)
end procedure    

Jordah Ferguson
jorfergie03 at yahoo.com



---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup
--0-824601938-1023447675=:30978
Content-Type: text/html; charset=us-ascii

<P>Hi Derek,</P>
<P>Would it be possible to add this to the next win32lib. They are extensions to
<BR>win32libs menu capabilities. Just spice them into win32lib language.</P>
<P>constant
<BR>zSetMenuItemInfo=registerw32Function(user32,"SetMenuItemInfoA",{C_LONG,
C_UINT, C_SHORT, C_POINTER}, C_USHORT)</P>
<P>global procedure setMenuBitmap(integer menuitem,object bitmap)<BR>integer
bool<BR>atom MENUITEMINFO&nbsp; <BR>MENUITEMINFO =
acquire_mem(0,48)--SIZE_OFMENUITEMINFO <BR>mem_set(MENUITEMINFO,0,48)<BR>if
sequence(bitmap) then<BR>bitmap = loadBitmapFromFile(bitmap)<BR>end
if<BR>poke4(MENUITEMINFO+0,48)<BR>poke4(MENUITEMINFO+4,#80)&nbsp;&nbsp;
--MIIM_BITMAP<BR>poke4(MENUITEMINFO+44,bitmap)<BR>bool =
w32Func(zSetMenuItemInfo,{getHandle(menuitem),menuitem,0,MENUITEMINFO})<BR>if
bool = NULL then<BR>warnErr("setMenuBitmap Failed()")<BR>end if<BR>bool =
w32Func(xDrawMenuBar,{getHandle(menuitem)})&nbsp;<BR>release_mem(MENUITEMINFO)<BR>end
procedure&nbsp;&nbsp;&nbsp; </P>
<P>Jordah Ferguson<BR><A href="mailto:jorfergie03 at yahoo.com">jorfergie03 at
yahoo.com</A></P><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a
href="http://rd.yahoo.com/welcome/*http://fifaworldcup.yahoo.com/fc/en/spl">Sign-up
for Video Highlights</a> of 2002 FIFA World Cup
--0-824601938-1023447675=:30978--

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu