 |
|
 |
Your TrackpoppMenu seems to not work with system tray popup menu, right ?
I would be grategul if you could provide some guidance on this ...
Thank you
|
|
|
|
 |
|
 |
GradientMenu.cpp: error C2440: 'static_cast': 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' can not convert to 'void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
Just a little thing
|
|
|
|
 |
 | menu  |  | Anonymous | 12:30 14 Mar '04 |
|
 |
How can i return to the previous action before i choose the menu item
thank you
|
|
|
|
 |
|
 |
Hi
Do you know how to set a checksymbol in a menuitem?
(I'm a beginner)
|
|
|
|
 |
|
 |
GetMenu()->CheckMenuItem( ID_MENU_ITEM1, MF_CHECKED );
|
|
|
|
 |
|
 |
downloaded and installed the product, looks good so far
|
|
|
|
 |
|
 |
the contextmenu displazed many times if
fast right clicks and the mouse is movin
so i have 100 of popups / anzone got this bug too
and fixed...
mm
|
|
|
|
 |
|
 |
I found a bug while I use the cool control:
I popup a menu with 30 items(or 40, 50, any number that the height of the menu > deskRect/2), then I click on the middle of the screen, I found that the menu can't popup.
here is my solution:
1) insert new function:
BOOL CXXXMenu::PositionSubMenu(CPoint pt, CRect menuRect, BOOL bRight)
{
CRect deskRect;
GetDesktopWindow()->GetWindowRect(&deskRect);
int nLeft = bRight ? pt.x : pt.x - menuRect.Width();
if(deskRect.Height() < menuRect.Height())
{
MoveWindow(nLeft, 0, menuRect.Width(), deskRect.Height());
return TRUE;
}
if(deskRect.Height()/2 < pt.y)
MoveWindow(nLeft, 0, menuRect.Width(), menuRect.Height());
else
MoveWindow(nLeft, deskRect.bottom - menuRect.Height(), menuRect.Width(), menuRect.Height());
return TRUE;
}
2) chage the function "PositionMenuWindow(...)", to
void CXXXMenu::PositionMenuWindow(CPoint pt, CRect* pItemRect, CRect menuRect)
{
CRect deskRect;
.
.
.
if(pItemRect)
{
if(PositionSubMenu(...) == FALSE)
{
if(PositionSubMenu(...) == FALSE)
{
if(PositionSubMenu(...) == FALSE)
{
if(PositionSubMenu(CPoint(pItemRect->left, pItemRect->bottom), menuRect, FALSE, FALSE) == FALSE)
{
BOOL bRight = (pItemRect->right + menuRect.Width() > deskRect.right) ? FALSE : TRUE;
int nLeft = bRight ? pItemRect->right : pItemRect->left;
PositionSubMenu(CPoint(nLeft, pItemRect->bottom), menuRect, bRight);
}
.
.
.
}
But unfortunately, this is only partial solution, if the menu have so many items, the height of menu will larger then the deskRect.Height(). with this solution, it can only display part of the memu item.
Is there any easy way to implement the feature like CMenu---there is two spin on the top and bottom of the menu window?
|
|
|
|
 |
|
 |
Thank you so much for providing this excellent control. There are a couple of things that could make it a lot more useful:
Sliding the mouse across the menu at the top of the window should cause the appropriate popup menus to appear, without clicking on each entry. This would be even better if there was a mouse hover feature and the ability to place bitmaps in there that toggled when the mouse passes over them.
Next, the could could really use something to manage longer titles. If the text for the title is longer in pixels than the popup menu is tall, it gets cut off. It would be better if the popup menu size was extended OR if the font for the gradient menu text was automatically resized to make the text fit the popup menu.
Thank you again! I hope to see future versions of this control.
David Berman
|
|
|
|
 |
|
 |
Is it possible to use a resource bitmap as the menu sidebar rather than a gradient? PLease point me to another tutorial if it exists.
Fave Quote.
"No just cos i like my computer more than you doesnt make me pathetic. Quite Frankly i find a tic-tac a more interesting companion than u."
|
|
|
|
 |
|
 |
Hello there,
I'm using the gradiant menu in one of my application but it cause some problem in Windows XP. actually i had added the toolbar in my application and on click on one of the button i'm showing the menu but it cause some problem while displaying it but if i'm using the normal menu i mean...cmenu then it works fine but if i'm using CGradientMenu then it cause problem while displaying it. actually i have to mouse over on one of the menu item then it displays it..so what could be the problem ..if u found the soln pls let me know...
my email id is: parassshah@rediffmail.com
Paras Shah
|
|
|
|
 |
|
 |
I'm unsure what you mean. epAssist, which uses this menu, works in XP (I've been using it since Beta 1) and the only problem I have with the menus is, the seperator is the wrong color (shown as grey, not the menu color.)
Do you have a simple app. you can email me, with step-by-step directions on how to make it happen?
Have you applied the XP styles XML to your application (resource #1)? There is an easy to follow article on Code Project.
|
|
|
|
 |
|
 |
Hi,
Can you please explain how to resolve the grey separator issue ?
Thanks
Jase
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
 |
|
 |
Hi,
Thanx alot for your nice program,
I used the code in my dialog box, and when a menu is
shown , and I move the dialog via mouse, the menu is already shown and dosen't close.
Can anyone help me?
Sample of the program has this problem.
Thanx before & Regards,
Hamed
|
|
|
|
 |
|
 |
This program is very cool, but there is a bug in it that is kind of a pain for me at the moment.
In the Windows version one can call the menu as indicated in the topic, however in your
code the menu looses it's gradient. I realize that I could simply omit the first item and merley
list the menu items as you did in your example code, but that would mean re-writting all of
my code.
Is there a fixe for this????
Thanks,
Brad
|
|
|
|
 |
|
 |
I have created the menus runtime.
The main popup menu works well but there are no coloring in the submenu ?
Any Ideas ?
|
|
|
|
 |
|
 |
It's been awhile since I've looked at this code, but I'm sure
CGradientMenu::m_bShowBmpAll is responsible.. It would be set in the constructor:
CGradientMenu(int nBannerWidth=24, BOOL bShow4SubMenu=**FALSE**);
|
|
|
|
 |
|
 |
I reckon that it would be cool++ if it could programmatically construct itself (followed by the LoadMenuIndirect call). This would make the class independent of resource files.
Whadda ya think?
|
|
|
|
 |
|
 |
Hi,
This is great work but is there a way to modify your code to have the TrackPopupMenu() function return the Command Id that was selected from the menu? In a regular CMenu you can add the flag TPM_RETURNCMD and the menu immediately returns the Command Id selected, would this be possible with your menu?
TI
|
|
|
|
 |
|
 |
It can be possible after some modifications of code for class MenuToolBar and CGradientMenu. One needs to get value of variable m_nLastLBDownIndex that belongs to class MenuToolBar. This value will be index of the button for which left mouse click event was last processed. Then, to get resource ID of selected item, use function GetMenuItemID.
|
|
|
|
 |
|
 |
hi,
i have a popup menu which pops up when the user presses
with the right botton on it.it's located in the tray icon
bar (where the time is displayed).
i wrote it with Win32 API and now i want to add a bitmap
to this popup menu like windows does it on the "start"
button (you can see a bitmap "windows nt workstation" on the left part across the menu).
how i'm suppose to do it ??
thank you !!!
i liked the way you did it, but i can't use mfc with my application. i have to use the win32 api.
please, can you help me ???
|
|
|
|
 |
|
 |
well my friend ... there is no FREE way to do this in win32 api. you have to make an owner drawn menu. this means that you have to add items to menu urself and u have to paint the menu urself using the WM_MEASUREITEM and WM_DRAWITEM messages. i once tried to make a class for this but got tired of it as it was too hectic and too much BORING work. if you really really want this feature without "abstration" then i suggest u use WTL and furthermore read Ramon Smits article "Cool WTL menu with Gradient Sidebar". it's a pretty cool article and frankly WTL makes your work a lot easier with very little abstraction (trust me since i am a win32 programmer as well and i really really HATE MFC ).
Zulfiqar Inayat Malik
Zulfiqar Inayat Malik
|
|
|
|
 |
|
 |
I have downloaded and installed the product, looks good so far
|
|
|
|
 |
|
 |
with VC5 (i am still using VC5 because it works close
together with Digital Visual Fortran and VC6 does not)
i got 53 errors like:
D:\gradmenu\GradientMenu.cpp(115) : error C2661: 'CreateEx' : no overloaded function takes 3 parameters
D:\gradmenu\GradientMenu.cpp(134) : error C2065: 'TB_SETHOTITEM' : undeclared identifier
D:\gradmenu\GradientMenu.cpp(157) : error C2039: 'HitTest' : is not a member of 'CToolBarCtrl'
i noticed 'afxdtctl.h' in stdafx.h, which is new to me.
do i need VC6 to get this working?
regards,
sten struikenkamp
the netherlands
|
|
|
|
 |
|
 |
As far as I can tell, you will need VC6. I found in MSDN:
"To support functionality introduced in Internet Explorer, version 4.0 and later, MFC provides image list support and transparent and flat styles for toolbar controls."
Since some of your errors are related to HotItem, and that is related to flat toolbars, could this be your trouble?
Was there a download that allowed enhanced support for IE4? It's been a few years.. I can't recall.
|
|
|
|
 |