AutoHotkey Community

It is currently May 26th, 2012, 6:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Multi column menu
PostPosted: January 9th, 2008, 9:09 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

is it possible to make large menus multi column like the windows start menu instead of using the scrolling arrows on top and bottom of the menu?

Here an example for a start menu which has more entries than the screen height.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Multi column menu
PostPosted: January 9th, 2008, 11:25 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
Tekl wrote:
Here an example for a start menu which has more entries than the screen height.


Where?!??

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2008, 11:28 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Ups: http://expertanswercenter.techtarget.co ... rtMenu.gif

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2008, 12:00 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
propbably this link including democode in vb helps you

http://vbnet.mvps.org/index.html?code/enums/enumfontsetmenuiteminfo.htm

also found this one

http://msdn2.microsoft.com/en-us/library/ms648001(VS.85).aspx

i guess the trick is to use SetMenuItemInfo, but i didnt read through all articles

let me know if it helped or pointed you in right direction

greets
derRaphael

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2008, 6:48 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Thanks for the info.

It works with the help of MI_GetMenuHandle from Menu Icons v2


Code:
SysGet, WorkArea, MonitorWorkArea
WorkAreaWidth  := WorkAreaRight-WorkAreaLeft
WorkAreaHeight := WorkAreaBottom-WorkAreaTop
SysGet, MenuBarHeight, 15

MenuHandle := GetMenuHandle("Tray")

TrayMenuItemCount := DllCall("GetMenuItemCount","uint",TrayMenuHandle)
MenuItemHeight := MenuBarHeight-3
If MenuItemHeight*TrayMenuItemCount > WorkAreaHeight
{
   TrayMenuBreak := TrayMenuItemCount/2
   VarSetCapacity(mii,48,0)
   NumPut(48,mii)
   NumPut(0x10,mii,4) ; fMask = MIIM_TYPE
   NumPut(0x160,mii,8) ; fType = RGB_VERTICALBARBREAK
   DllCall("SetMenuItemInfo","uint",TrayMenuHandle,"uint",TrayMenuBreak,"uint",1,"uint",&mii)
}


_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 7:40 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Does anybody know if it is possible to insert a menu item into an existing menu. My code changes one menu item to a separator, so this item is missing in the menu.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2008, 1:27 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Use InsertMenuItem.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2008, 9:51 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Oh thanks. I just have to replace SetMenuItemInfo with InsertMenuItem.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, JSLover, LazyMan, Tipsy3000 and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group