亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xpmenu.pas

?? 完善的學生管理系統源碼 適用于畢業設計和各種小的設計
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
    {$ENDIF}

    if (Comp is TControlBar) and (xcControlBar in FXPControls) then
      if not (csDesigning in ComponentState) then
      begin
        if Enable then
        begin
          if (not assigned(TControlBar(Comp).OnBandPaint))
            or (FOverrideOwnerDraw) then
          begin
            TControlBar(Comp).OnBandPaint := ControlBarPaint;
          end;
        end
        else
        begin
          if addr(TControlBar(Comp).OnBandPaint) =
            addr(TXPMenu.ControlBarPaint) then
          TControlBar(Comp).OnBandPaint := nil;
        end;
        if Update then
          TControlBar(Comp).Invalidate;
      end;

    if not (csDesigning in ComponentState) then
      if {$IFDEF VER6U}
         ((Comp is TCustomCombo) and (xcCombo in FXPControls)) or
         ((Comp is TCustomLabeledEdit) and (xcEdit in FXPControls)) or

         {$ELSE}
         ((Comp is TCustomComboBox) and (xcCombo in FXPControls)) or
         {$ENDIF}
         ((Comp is TEdit) and (xcEdit in FXPControls)) or
         ((Comp.ClassName = 'TMaskEdit') and (xcMaskEdit in FXPControls)) or
         ((Comp.ClassName = 'TDBEdit') and (xcMaskEdit in FXPControls)) or
         ((Comp is TCustomMemo) and (xcMemo in FXPControls)) or
         ((Comp is TCustomRichEdit) and (xcRichEdit in FXPControls)) or

         ((Comp is TCustomCheckBox) and (xcCheckBox in FXPControls)) or
         ((Comp is TRadioButton) and (xcRadioButton in FXPControls)) or
         ((Comp.ClassName = 'TBitBtn') and (xcBitBtn in FXPControls)) or
         ((Comp.ClassName = 'TButton') and (xcButton in FXPControls)) or
         ((Comp.ClassName = 'TUpDown') and (xcButton in FXPControls)) or
         ((Comp is TSpeedButton) and (xcSpeedButton in FXPControls)) or
         ((Comp is TCustomPanel) and (xcPanel in FXPControls)) or
         ((Comp is TCustomGroupBox) and (xcGroupBox in FXPControls))
         then
        if ((TControl(Comp).Parent is TToolbar) and (xccToolBar in FXPContainers))or
           ((TControl(Comp).Parent is TCoolbar) and (xccCoolbar in FXPContainers)) or
           ((TControl(Comp).Parent is TCustomPanel) and (xccPanel in FXPContainers)) or
           ((TControl(Comp).Parent is TControlbar) and (xccControlbar in FXPContainers)) or
           ((TControl(Comp).Parent is TScrollBox) and (xccScrollBox in FXPContainers)) or
           ((TControl(Comp).Parent is TCustomGroupBox) and (xccGroupBox in FXPContainers)) or
           ((TControl(Comp).Parent is TTabSheet) and (xccTabSheet in FXPContainers)) or
           ((TControl(Comp).Parent.ClassName = 'TdxTabSheet') and (xccTabSheet in FXPContainers)) or //DeveloperExpress
           ((TControl(Comp).Parent is TPageScroller)  and (xccPageScroller in FXPContainers)) or
           {$IFDEF VER5U}
           ((TControl(Comp).Parent is TCustomFrame)  and (xccFrame in FXPContainers)) or
           {$ENDIF}
           ((TControl(Comp).Parent.ClassName = 'TDBCtrlPanel')  and (xccFrame in FXPContainers)) or

           ((TControl(Comp).Parent is TCustomForm) and (xccForm in FXPContainers))


           then
        begin
          if (Enable) and (Comp.Tag <> 999) and (TControl(Comp).Parent.Tag <> 999) then
                                      {skip if Control/Control.parent.tag = 999}
            with TControlSubClass.Create(Self)  do
            begin
              Control := TControl(Comp);
              if Addr(Control.WindowProc) <> Addr(TControlSubClass.ControlSubClass) then
              begin
                orgWindowProc := Control.WindowProc;
                Control.WindowProc := ControlSubClass;
              end;
              XPMenu := self;

              if (Control is TCustomEdit) then
              begin
                FCtl3D := TEdit(Control).Ctl3D;
                FBorderStyle := TRichEdit(Control).BorderStyle;
              end;

            end;

          if Update then
          begin
           // if Comp is TWinControl then    //Cause error with non wincontrol
              TControl(Comp).invalidate    //in TControlSubClass.ControlSubClass
           // else
           //   TControl(Comp).Update;
          end;

        end;


    // Recursive call for possible containers.
    {$IFDEF VER5U}
    if ((Comp is TCustomFrame) and (xccFrame in FXPContainers))
     or (Comp is TCustomForm) then  //By Geir Wikran <gwikran@online.no>
      self.InitItems(Comp as TWinControl, Enable, Update);
    {$ENDIF}


  end;
end;

procedure TXPMenu.DrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect;
  Selected: Boolean);
begin
  if FActive then
    MenueDrawItem(Sender, ACanvas, ARect, Selected);
end;



function TXPMenu.GetImageExtent(MenuItem: TMenuItem): TPoint;
var
  HasImgLstBitmap: boolean;
  B: TBitmap;
  FTopMenu: boolean;
begin
  FTopMenu := false;
  B := TBitmap.Create;
  B.Width := 0;
  B.Height := 0;
  Result.x := 0;
  Result.Y := 0;
  HasImgLstBitmap := false;

  {Changes MMK TForm and TFrame}
  if (FForm is TForm) and ((FForm as TForm).Menu <> nil) then
    if MenuItem.GetParentComponent.Name = (FForm as TForm).Menu.Name then
    begin
      FTopMenu := true;
      if (FForm as TForm).Menu.Images <> nil then
        if MenuItem.ImageIndex <> -1 then
          HasImgLstBitmap := true;

    end;

  {End Changes}


  if (MenuItem.Parent.GetParentMenu.Images <> nil)
  {$IFDEF VER5U}
  or (MenuItem.Parent.SubMenuImages <> nil)
  {$ENDIF}
  then
  begin
    if MenuItem.ImageIndex <> -1 then
      HasImgLstBitmap := true
    else
      HasImgLstBitmap := false;
  end;

  if HasImgLstBitmap then
  begin
  {$IFDEF VER5U}
    if MenuItem.Parent.SubMenuImages <> nil then
      MenuItem.Parent.SubMenuImages.GetBitmap(MenuItem.ImageIndex, B)
    else
  {$ENDIF}
      MenuItem.Parent.GetParentMenu.Images.GetBitmap(MenuItem.ImageIndex, B)
  end
  else
    if MenuItem.Bitmap.Width > 0 then
      B.Assign(TBitmap(MenuItem.Bitmap));

  Result.x := B.Width;
  Result.Y := B.Height;

  if not FTopMenu then
    if Result.x < FIconWidth then
      Result.x := FIconWidth;

  B.Free;
end;

procedure TXPMenu.MeasureItem(Sender: TObject; ACanvas: TCanvas;
  var Width, Height: Integer);
var
  s: string;
  W, H: integer;
  P: TPoint;
  IsLine: boolean;
  OSVersionInfo: TOSVersionInfo;
begin
  if FActive then
  begin
    S := TMenuItem(Sender).Caption;

    if S = '-' then IsLine := true else IsLine := false;
    if IsLine then
      S := '';

    if Trim(ShortCutToText(TMenuItem(Sender).ShortCut)) <> '' then
      S := S + ShortCutToText(TMenuItem(Sender).ShortCut) + 'WWW';

    ACanvas.Font.Assign(FFont);
    W := ACanvas.TextWidth(s);
    Inc(W, 5);
    if pos('&', s) > 0 then
      W := W - ACanvas.TextWidth('&');

    P := GetImageExtent(TMenuItem(Sender));
    if P.X > 0 then
      W := W + P.x ;


    //Add 8 pixels for win2k
    if (FForm is TForm) and ((FForm as TForm).Menu <> nil) then
      if TMenuItem(Sender).GetParentComponent.Name = (FForm as TForm).Menu.Name then
      begin  //FTopMenu := true;
        GetVersionEx(OSVersionInfo);
        if OSVersionInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then
          Inc(W, 8);
      end;

    if Width < W then
      Width := W;

    if IsLine then
      Height := 4
    else
    begin
      H := ACanvas.TextHeight(s) + Round(ACanvas.TextHeight(s) * 0.75);
      if P.y + 6 > H then
        H := P.y + 6;

      if Height < H then
        Height := H;
    end;
  end;

end;

procedure TXPMenu.MenueDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect;
  Selected: Boolean);
var
  txt: string;
  B: TBitmap;
  IconRect, TextRect, CheckedRect: TRect;
  i, X1, X2: integer;
  TextFormat: integer;
  HasImgLstBitmap: boolean;
  HasBitmap: boolean;
  FMenuItem: TMenuItem;
  FMenu: TMenu;
  FTopMenu: boolean;
  IsLine: boolean;
  ImgListHandle: HImageList;  {Commctrl.pas}
  ImgIndex: integer;
  hWndM: HWND;
  hDcM: HDC;

begin


  FTopMenu := false;
  FMenuItem := TMenuItem(Sender);

  SetGlobalColor(ACanvas);

  if FMenuItem.Caption = '-' then IsLine := true else IsLine := false;

  FMenu := FMenuItem.Parent.GetParentMenu;

  if FMenu is TMainMenu then
    for i := 0 to FMenuItem.GetParentMenu.Items.Count - 1 do
      if FMenuItem.GetParentMenu.Items[i] = FMenuItem then
      begin
        FTopMenu := True;
        break;
      end;


  ACanvas.Font.Assign(FFont);

  Inc(ARect.Bottom, 1);
  TextRect := ARect;
  txt := ' ' + FMenuItem.Caption;

  B := TBitmap.Create;
  HasBitmap := false;
  HasImgLstBitmap := false;


  if (FMenuItem.Parent.GetParentMenu.Images <> nil)
  {$IFDEF VER5U}
  or (FMenuItem.Parent.SubMenuImages <> nil)
  {$ENDIF}
  then
  begin
    if FMenuItem.ImageIndex <> -1 then
      HasImgLstBitmap := true
    else
      HasImgLstBitmap := false;
  end;

  if FMenuItem.Bitmap.Width  > 0 then
    HasBitmap := true;

//-------
  if HasBitmap then
    begin
      B.Width := FMenuItem.Bitmap.Width;
      B.Height := FMenuItem.Bitmap.Height;

      B.Canvas.CopyRect (Rect(0, 0, B.Width, B.Height), FMenuItem.Bitmap.Canvas,
                         Rect(0, 0, B.Width, B.Height));
    end;


  if HasImgLstBitmap then
  begin
  {$IFDEF VER5U}
    if FMenuItem.Parent.SubMenuImages <> nil then
    begin
      ImgListHandle := FMenuItem.Parent.SubMenuImages.Handle;
      ImgIndex := FMenuItem.ImageIndex;

      B.Width := FMenuItem.Parent.SubMenuImages.Width;
      B.Height := FMenuItem.Parent.SubMenuImages.Height;
      B.Canvas.Brush.Color := ACanvas.Brush.Color;
      B.Canvas.FillRect(Rect(0, 0, B.Width, B.Height));
      ImageList_DrawEx(ImgListHandle, ImgIndex,
        B.Canvas.Handle, 0, 0, 0, 0, clNone, clNone, ILD_Transparent);

    end
    else
  {$ENDIF}
    if FMenuItem.Parent.GetParentMenu.Images <> nil then
    begin
      ImgListHandle := FMenuItem.Parent.GetParentMenu.Images.Handle;
      ImgIndex := FMenuItem.ImageIndex;

      B.Width := FMenuItem.Parent.GetParentMenu.Images.Width;
      B.Height := FMenuItem.Parent.GetParentMenu.Images.Height;
      B.Canvas.Brush.Color := ACanvas.Pixels[2,2];
      B.Canvas.FillRect(Rect(0, 0, B.Width, B.Height));
      ImageList_DrawEx(ImgListHandle, ImgIndex,
        B.Canvas.Handle, 0, 0, 0, 0, clNone, clNone, ILD_Transparent);

    end;

  end;

//-----

  if FMenu.IsRightToLeft then
  begin
    X1 := ARect.Right - FIconWidth;
    X2 := ARect.Right;
  end
  else
  begin
    X1 := ARect.Left;
    X2 := ARect.Left + FIconWidth;
  end;
  IconRect := Rect(X1, ARect.Top, X2, ARect.Bottom);


  if HasImgLstBitmap or HasBitmap then
  begin
    CheckedRect := IconRect;
    Inc(CheckedRect.Left, 1);
    Inc(CheckedRect.Top, 2);
    Dec(CheckedRect.Right, 3);
    Dec(CheckedRect.Bottom, 2);
  end
  else
  begin
    CheckedRect.Left := IconRect.Left +
      (IConRect.Right - IconRect.Left - 10) div 2;
    CheckedRect.Top := IconRect.Top +
      (IConRect.Bottom - IconRect.Top - 10) div 2;
    CheckedRect.Right := CheckedRect.Left + 10;
    CheckedRect.Bottom := CheckedRect.Top + 10;
  end;

  if B.Width > FIconWidth then
    if FMenu.IsRightToLeft then
      CheckedRect.Left := CheckedRect.Right - B.Width
    else
      CheckedRect.Right := CheckedRect.Left + B.Width;

  if FTopMenu then Dec(CheckedRect.Top, 1);


  if FMenu.IsRightToLeft then
  begin
    X1 := ARect.Left;
    if not FTopMenu then
      Dec(X2, FIconWidth)
    else
      Dec(X2, 4);
    if (ARect.Right - B.Width) < X2 then
      X2 := ARect.Right - B.Width - 8;
  end
  else
  begin
    X1 := ARect.Left ;
    if not FTopMenu then
      Inc(X1, FIconWidth)
    else
      Inc(X1, 4);

    if (ARect.Left + B.Width) > X1 then
      X1 := ARect.Left + B.Width + 4;
    X2 := ARect.Right;
  end;

  TextRect := Rect(X1, ARect.Top, X2, ARect.Bottom);

  if FTopMenu then
  begin
    if not (HasImgLstBitmap or HasBitmap) then
    begin
      TextRect := ARect;
    end
    else
    begin
      if FMenu.IsRightToLeft then
        TextRect.Right := TextRect.Right + 5
      else
        TextRect.Left := TextRect.Left - 5;
    end

  end;

  if FTopMenu then
  begin
    ACanvas.brush.color := FFMenuBarColor;
    ACanvas.Pen.Color := FFMenuBarColor;

    ACanvas.FillRect(ARect);
  end
  else
  begin
    if (Is16Bit and FGradient) then
    begin
      inc(ARect.Right,2);  //needed for RightToLeft
      DrawGradient(ACanvas, ARect, FMenu.IsRightToLeft);
      Dec(ARect.Right,2);

    end
    else
    begin
      ACanvas.brush.color := FFColor;
      ACanvas.FillRect(ARect);

      ACanvas.brush.color := FFIconBackColor;
      ACanvas.FillRect(IconRect);
    end;


//------------
  end;


  if FMenuItem.Enabled then

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产麻豆| 欧美视频完全免费看| 久久久五月婷婷| 春色校园综合激情亚洲| 中文字幕精品综合| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲精品你懂的| 欧美肥胖老妇做爰| 久久9热精品视频| 国产欧美一区二区在线观看| 色综合天天天天做夜夜夜夜做| 一区二区三区色| 制服丝袜亚洲色图| 国产精品88av| 亚洲激情图片一区| 日韩美女主播在线视频一区二区三区| 精一区二区三区| 国产精品久久久久永久免费观看 | 色婷婷综合激情| 亚洲成人一区二区在线观看| 精品国产一二三区| 99精品视频中文字幕| 日本亚洲一区二区| 日本一区二区三区电影| 欧美日韩亚洲综合在线 | 国产成人免费网站| 亚洲亚洲精品在线观看| 2021久久国产精品不只是精品| eeuss鲁片一区二区三区 | 色偷偷一区二区三区| 日本免费新一区视频| 国产精品久久久久影院亚瑟| 欧美久久一区二区| 国产成人综合网站| 日韩国产在线观看| 亚洲欧美激情小说另类| 欧美mv日韩mv| 欧美日韩亚洲综合在线| 成人av电影观看| 精品一区二区三区免费播放| 亚洲一区二区在线免费观看视频 | 欧美肥妇bbw| 91在线观看污| 国产在线视频一区二区三区| 亚洲成av人片www| 中文字幕制服丝袜成人av| 日韩精品一区国产麻豆| 91久久精品国产91性色tv| 国产不卡高清在线观看视频| 天天综合色天天综合色h| 亚洲精品国产高清久久伦理二区| 国产亚洲精久久久久久| 日韩美女视频一区二区在线观看| 91福利在线免费观看| 波多野结衣一区二区三区| 精品无码三级在线观看视频| 日韩影院精彩在线| 亚洲福利国产精品| 亚洲免费高清视频在线| 中文字幕中文在线不卡住| 久久久九九九九| 日韩免费福利电影在线观看| 欧美一区二区三区小说| 欧美日韩国产美女| 在线一区二区视频| 日本道精品一区二区三区| bt7086福利一区国产| 国产99久久精品| 国产成人综合视频| 国产成人精品一区二| 国产精品影音先锋| 黄色成人免费在线| 国产一区二区三区电影在线观看| 久久国产精品色| 韩国欧美国产一区| 国产精品69久久久久水密桃| 国产福利一区二区三区视频在线 | 亚洲精品国产精华液| 中文字幕在线观看一区| 国产精品色噜噜| 中文字幕亚洲一区二区av在线 | 亚洲第一在线综合网站| 亚洲最色的网站| 综合久久久久久| 国产无人区一区二区三区| 国产欧美日韩在线看| 欧美国产日韩一二三区| 欧美国产精品中文字幕| 亚洲欧美激情在线| 天天综合天天综合色| 免费日韩伦理电影| 国产精品123| 97精品电影院| 欧美理论电影在线| 精品久久国产字幕高潮| 亚洲国产电影在线观看| 亚洲欧美电影一区二区| 日韩黄色小视频| 国产精品亚洲视频| 色综合天天综合网国产成人综合天 | 亚洲视频一二区| 亚洲国产精品嫩草影院| 美国十次了思思久久精品导航| 国内欧美视频一区二区 | 欧洲色大大久久| 欧美一区二区网站| 国产日韩欧美制服另类| 亚洲综合精品久久| 久久福利视频一区二区| 成年人国产精品| 欧美日本精品一区二区三区| 久久欧美中文字幕| 一区二区三区久久久| 黄一区二区三区| 日本韩国欧美一区| 久久久久久久久久久电影| 亚洲精品国产无天堂网2021| 精品一区二区三区在线视频| 91麻豆国产香蕉久久精品| 在线播放91灌醉迷j高跟美女| 国产亚洲一区二区在线观看| 一个色综合网站| 国产宾馆实践打屁股91| 717成人午夜免费福利电影| 国产精品婷婷午夜在线观看| 三级成人在线视频| 成人高清视频在线观看| 日韩一卡二卡三卡| 樱桃视频在线观看一区| 国产成人免费在线视频| 91精品国产色综合久久不卡蜜臀| 一区在线观看视频| 精品一区二区免费视频| 欧美三区在线视频| 中文字幕亚洲区| 国产精品一区二区久久不卡| 69久久夜色精品国产69蝌蚪网| 亚洲欧美一区二区视频| 精品无码三级在线观看视频| 欧美无砖专区一中文字| 国产精品色哟哟网站| 精品一区二区免费视频| 欧美乱妇一区二区三区不卡视频| 亚洲另类一区二区| 不卡大黄网站免费看| 久久精品一区二区| 精品一区二区三区免费视频| 69堂成人精品免费视频| 亚洲成人你懂的| 欧美亚洲综合久久| 亚洲日本免费电影| 成人aaaa免费全部观看| 中文字幕免费不卡| 国产成人99久久亚洲综合精品| 久久只精品国产| 久久91精品国产91久久小草| 中文字幕在线观看一区| 成人精品视频一区二区三区 | 国产精品久久久久三级| 国产成人高清在线| 久久久.com| 国产高清在线精品| 国产区在线观看成人精品| 国产一区二区久久| www国产成人免费观看视频 深夜成人网| 精品久久99ma| 国产91精品入口| 亚洲一二三四区| 精品播放一区二区| 色一区在线观看| 黄色小说综合网站| 综合电影一区二区三区| 制服.丝袜.亚洲.中文.综合| 国产精品综合在线视频| 亚洲综合激情网| 国产亚洲综合色| 欧美日韩亚洲丝袜制服| 国产精品1024久久| 亚洲444eee在线观看| 中文字幕乱码久久午夜不卡 | 国产成人av一区二区| 亚洲综合区在线| 久久精品网站免费观看| 欧美视频一区二区在线观看| 国产精品一级黄| 爽好久久久欧美精品| 一区在线中文字幕| 欧美xxxx老人做受| 欧美亚洲国产一区在线观看网站| 精品一区二区在线视频| 亚洲最新在线观看| 欧美国产禁国产网站cc| 日韩一区二区麻豆国产| 91同城在线观看| 精品一区二区三区蜜桃| 丝袜亚洲另类欧美综合| 一区二区在线观看视频| 国产亚洲一区二区三区在线观看| 欧美一区日韩一区| 欧美伊人久久久久久久久影院|