Originally posted by: andi
If I create menu "P&arameters" Alt-e don't call menu.
Probably toupper macros missed.
BOOL CMenuBar::MapAccessKey(...
...
toupper(cKey) == cAccessKey) {
...
Originally posted by: Koay Kah Hoe
When clicking close button on the right of the menu bar, it could cause an access violation error.
This is because after executing the following line in your function CMenuControl::OnMouseMsg(...) :
pFrame->SendMessage(WM_SYSCOMMAND, syscmd[m_nTracking]);
The CMenuControl object is destroyed after this. However, the following line still accesses the member of destroyed object:
m_nTracking = -1;
To solve this problem, I just changed the SendMessage function to PostMessage & the problem is solved.
ReplyOriginally posted by: andi
I know two bug, but i am not shure, that this bugs always visible. I work with Win95 PE, but it tested also
on Win NT, Win 98. Visual C++ 5.0/6.0.
No underline when used horisontal direction. I can correct it by substraction of 1 in
void CMenuButton::DrawHorzText(CDC* pDC, CPoint ptOffset):
rcBtn.DeflateRect(CXTEXTMARGIN, CYTEXTMARGIN-1);
Method to decide second problem:
info.lfMenuFont.lfOrientation = -900;
strcpy (info.lfMenuFont.lfFaceName, _T("Arial")); // Add it
Originally posted by: Viktor
While compiling Your sample project in VC 6.0 I obtained several errors of type
error C2440: '=' : cannot convert from 'char [256]' to 'unsigned short *'
error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [31]' to 'const unsigned short *'
(here are some of them). It's not a good idea to post a project that even cannot be built.
I see Your article is new, one of the newest, and hope to find it improved.
And another thing. I spent some time studying the theme of ownerdrawn and dockable menus, made my own attempts to customize menu features and develop an universal class for their support. And I never seen a class (classes) combining all of popular features: bitmaps and other ownerdrawn beauty with bockability. What about this? The important goal is to make a class with greater features and smaller customization (usage) overhead required.
Thank You.