AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multi column menu

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Wed Jan 09, 2008 9:09 pm    Post subject: Multi column menu Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
DerRaphael



Joined: 23 Nov 2007
Posts: 429
Location: Heidelberg, Germany

PostPosted: Wed Jan 09, 2008 11:25 pm    Post subject: Re: Multi column menu Reply with quote

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


Where?!??
_________________
Code:
If ((myWish="post in forum") && (!(haveAccount) || !(loggedIn))) {
    MsgBox, 64, Forum Hint, It's a good idea to sign up and/or login to post in forum!
} else if ((RTFM) && (searchedForum) && (usesBrain)) {
    Send, %Request%
}
Back to top
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Wed Jan 09, 2008 11:28 pm    Post subject: Reply with quote

Ups: http://expertanswercenter.techtarget.com/digitalguide/images/Misc/myStartMenu.gif
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
DerRaphael



Joined: 23 Nov 2007
Posts: 429
Location: Heidelberg, Germany

PostPosted: Thu Jan 10, 2008 12:00 am    Post subject: Reply with quote

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
_________________
Code:
If ((myWish="post in forum") && (!(haveAccount) || !(loggedIn))) {
    MsgBox, 64, Forum Hint, It's a good idea to sign up and/or login to post in forum!
} else if ((RTFM) && (searchedForum) && (usesBrain)) {
    Send, %Request%
}
Back to top
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Thu Jan 10, 2008 6:48 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Feb 23, 2008 7:40 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Lexikos



Joined: 17 Oct 2006
Posts: 2526
Location: Australia, Qld

PostPosted: Sun Feb 24, 2008 1:27 am    Post subject: Reply with quote

Use InsertMenuItem.
Back to top
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Mon Feb 25, 2008 9:51 am    Post subject: Reply with quote

Oh thanks. I just have to replace SetMenuItemInfo with InsertMenuItem.
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group