cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Mon Apr 25, 2011 12:07 am Post subject: bitmenu.dsu (mergemenu.dsu) |
|
|
Update - Updated.
Expect an update very soon. Just found http://www.vdsworld.com/forum/viewtopic.php?t=1928
This community absolutely rocks.
Credit to Codescript. Original post @ http://www.vdsworld.com/forum/viewtopic.php?t=1735
In windows 7 large bitmaps auto-resize in menu.
No issues in Windows 7 or Windows Vista. Bitmap resize untested in Vista.
Making the call from dsc
Code: |
rem - seps count as one increment too!
bitmenu #parent,ntoolbar\UI_new.bmp,0,0
bitmenu #parent,ntoolbar\UI_open.bmp,0,1
bitmenu #parent,ntoolbar\UI_save.bmp,0,2
rem mergemenu,<#Class>,<Target Menu>,<Target Submenu>,<Subject Menu>,<Target Submenu Name>
mergemenu #parent,3,5,4,Table
mergemenu #parent,2,3,3,Insert
rem This puts Table (Menu 4) into Insert (Menu 3) as the 5th item (from 0), and then puts Insert into Format (Menu 2) as the 3rd item, creating a sub-submenu. Deletes both Table and Insert menus (which now exists in Format menu)
|
bitmenu.dsu
Code: |
#define command,bitmenu
#define command,mergemenu
:bitmenu
LOADLIB USER32
%1 = @strdel(@WINEXISTS(%1),1,1)
%9 = @lib(user32,LoadImageA,INT:,0,%2,0,0,0,$10)
%8 = @lib(user32,GetMenu,INT:,%1)
%7 = @lib(user32,GetSubMenu,INT:,%8,%3)
%6 = @lib(user32,SetMenuItemBitmaps,BOOL:,%7,%4,$400,%9,%9)
%5 = @lib(user32,DrawMenuBar,INT:,%1)
FREELIB USER32
exit
:mergemenu
LOADLIB USER32
%1 = @strdel(@WINEXISTS(%1),1,1)
%9 = @lib(user32,GetMenu,INT:,%1)
%8 = @lib(user32,GetSubMenu,INT:,%9,%2)
%7 = @lib(user32,GetSubMenu,INT:,%9,%4)
%6 = @lib(user32,ModifyMenuA,INT:,%8,%3,@SUM($400,$10),%7,STR:%5)
%6 = @lib(user32,DeleteMenu,BOOL:,%9,%4,$400)
%5 = @lib(user32,DrawMenuBar,INT:,%1)
FREELIB USER32
exit
|
|
|