WTL CCommandBarCtrlImpl bug: Assert is raised on right clicking command bar menu

Symptoms

When command bar menu item is right clicked, an assertion window is popped up (see below).

image001.png image002.png

Solution

Exiting in CCommandBarCtrlImpl::DoTrackPopupMenu right before assertion line seems to be fixing the problem.

return FALSE;
}

// HOTFIX: (Alax.Info) Avoid assert on right clicking the menu item
if(s_hCreateHook)
return FALSE;

ATLASSERT(s_hCreateHook == NULL);

Categories: WTL

Leave a Reply