| View previous topic :: View next topic |
| Author |
Message |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Wed Jan 09, 2008 9:09 pm Post subject: Multi column menu |
|
|
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 |
|
 |
DerRaphael
Joined: 23 Nov 2007 Posts: 429 Location: Heidelberg, Germany
|
Posted: Wed Jan 09, 2008 11:25 pm Post subject: Re: Multi column menu |
|
|
| 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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
|
| Back to top |
|
 |
DerRaphael
Joined: 23 Nov 2007 Posts: 429 Location: Heidelberg, Germany
|
Posted: Thu Jan 10, 2008 12:00 am Post subject: |
|
|
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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Thu Jan 10, 2008 6:48 am Post subject: |
|
|
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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Sat Feb 23, 2008 7:40 pm Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2526 Location: Australia, Qld
|
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Mon Feb 25, 2008 9:51 am Post subject: |
|
|
Oh thanks. I just have to replace SetMenuItemInfo with InsertMenuItem. _________________ Tekl |
|
| Back to top |
|
 |
|