Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((p = wcschr( lpitem->Xlpstr, 't' )) != NULL) {
- RECT tmprc = rc;
- LONG tmpheight;
- int n = (int)( p - lpitem->Xlpstr);
- /* Item contains a tab (only meaningful in popup menus) */
- /* get text size before the tab */
- txtheight = DrawTextW( hdc, lpitem->Xlpstr, n, &rc,
- DT_SINGLELINE|DT_CALCRECT);
- txtwidth = rc.right - rc.left;
- p += 1; /* advance past the Tab */
- /* get text size after the tab */
- tmpheight = DrawTextW( hdc, p, -1, &tmprc,
- DT_SINGLELINE|DT_CALCRECT);
- lpitem->dxTab += txtwidth;
- txtheight = max( txtheight, tmpheight);
- txtwidth += MenuCharSize.cx + /* space for the tab */
- tmprc.right - tmprc.left; /* space for the short cut */
- }
- Text = lpitem->Xlpstr;
- if(Text)
- {
- for (i = 0; Text[i]; i++)
- if (Text[i] == L't' || Text[i] == L'b')
- break;
- }
- if(lpitem->fState & MF_GRAYED)
- DrawTextW( hdc, Text, i, &rect, uFormat);
- /* paint the shortcut text */
- if (!menuBar && L'