Article ID: 143209
Article Last Modified on 11/21/2006
/* Compile options needed: Default
*/
void COwnerWindow::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT
lpMeasureItemStruct)
{
if ( lpMeasureItemStruct->CtlType == ODT_MENU &&
IsMenu((HMENU)lpMeasureItemStruct->itemID) &&
lpMeasureItemStruct->itemID == (UINT)m_hMenuSub )
{
// MFC's self-drawing won't work in this case
// go ahead and handle it here
lpMeasureItemStruct->itemWidth = 100;
lpMeasureItemStruct->itemHeight = 20;
}
else
// let MFC's self-drawing handle it
CFrameWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
}
Additional query words: 1.00 1.50 2.50 2.51 2.52 2.00 2.10 2.20 3.00 3.10 3.20 4.00
Keywords: kbmenu kbuidesign kbprb kbcode KB143209