|
p; '''' 画菜单项 If MyItemInfo(.itemID).itemType = MIT_SEPARATOR Then '''' 画菜单分隔条(MIT_SEPARATOR) If MyItemInfo(.itemID).itemType = MIT_SEPARATOR Then itemRect.Top = itemRect.Top + 2 itemRect.Bottom = itemRect.Top + 1 itemRect.Left = barRect.Right + 5 Select Case SepStyle Case MSS_NONE '''' 无分隔条 Case MSS_DEFAULT '''' 默认样式 DrawEdge .hdc, itemRect, EDGE_ETCHED, BF_TOP Case Else '''' 其它 hPen = CreatePen(SepStyle, 0, SepColor) hBrush = CreateSolidBrush(BkColor) SelectObject .hdc, hPen SelectObject .hdc, hBrush Rectangle .hdc, itemRect.Left, itemRect.Top, itemRect.Right, itemRect.Bottom DeleteObject hPen DeleteObject hBrush End Select End If Else If Not CBool(MyItemInfo(.itemID).itemState And MIS_DISABLED) Then '''' 当菜单项可用时 If .itemState And ODS_SELECTED Then '''' 当鼠标移动到菜单项时 '''' 设置菜单项高亮范围 If SelectScope And ISS_ICON_TEXT Then itemRect.Left = iconRect.Left ElseIf SelectScope And ISS_TEXT Then itemRect.Left = textRect.Left - 2 Else itemRect.Left = .rcItem.Left End If '''' 处理菜单项无图标或为CHECKBOX时的情况 &nb 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> 没有相关教程
|