FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jul 21, 2003 5:47 pm Post subject: Delete a menu item |
|
|
In plain VDS you can't remove a menu item. I'm not sure if this has been
posted already but here's what I did with no help. It might not work all
the way and needs further work, but this is what I have :
Code: | DIALOG CREATE,New Dialog,-1,0,240,160,CLASS MenuDlgTest
DIALOG ADD,MENU,MENU1,1,2,3,4,5,6,7,8,9
DIALOG SHOW
%%hwnd = @strdel(@winexists(#MenuDlgTest),1,1)
LOADLIB user32.dll
%A = @lib(user32,GetMenu,INT:,INT:%%hwnd)
%B = @lib(user32,DeleteMenu,BOOL:,INT:%A,INT:5,NIL:)
info Return Code: %B
FREELIB user32.dll
wait event
stop |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jul 27, 2003 1:44 am Post subject: |
|
|
The redrawing should be easy though, just takes a single line:
Code: | %C = @lib(user32,DrawMenuBar,BOOL:,INT:%%hwnd) |
|
|