forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


bitmenu.dsu (mergemenu.dsu)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Mon Apr 25, 2011 12:07 am    Post subject: bitmenu.dsu (mergemenu.dsu) Reply with quote

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
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group