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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? reportcontrol.pas

?? 國產(chǎn)的報表控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:

    FEditFont := CreateFontIndirect(ThisCell.LogFont);

    // 設(shè)置編輯窗的字體
    if IsWindow(FEditWnd) then
    begin
      DestroyWindow(FEditWnd);
    end;

    //// Edit Window's Position
    case ThisCell.HorzAlign of
      TEXT_ALIGN_LEFT:
        dwStyle := WS_VISIBLE or WS_CHILD or ES_MULTILINE or ES_LEFT or ES_AUTOVSCROLL;
      TEXT_ALIGN_CENTER:
        dwStyle := WS_VISIBLE or WS_CHILD or ES_MULTILINE or ES_CENTER or ES_AUTOVSCROLL;
      TEXT_ALIGN_RIGHT:
        dwStyle := WS_VISIBLE or WS_CHILD or ES_MULTILINE or ES_RIGHT or ES_AUTOVSCROLL;
    else
      dwStyle := WS_VISIBLE or WS_CHILD or ES_MULTILINE or ES_LEFT or ES_AUTOVSCROLL;
    end;

    FEditWnd := CreateWindow('EDIT', '', dwStyle, 0, 0, 0, 0, Handle, 1, hInstance, nil);

    SendMessage(FEditWnd, WM_SETFONT, FEditFont, 1); // 1 means TRUE here.
    SendMessage(FEditWnd, EM_LIMITTEXT, 3000, 0);

    MoveWindow(FEditWnd, ThisCell.TextRect.left, ThisCell.TextRect.Top,
      ThisCell.TextRect.Right - ThisCell.TextRect.Left,
      ThisCell.TextRect.Bottom - ThisCell.TextRect.Top, True);
    SetWindowText(FEditWnd, PChar(ThisCell.CellText));
    ShowWindow(FEditWnd, SW_SHOWNORMAL);
    Windows.SetFocus(FEditWnd);
  end;
end;

procedure TReportControl.WMLButtonDown(var Message: TMessage);
var
  ThisCell: TReportCell;
  MousePoint: TPoint;
  TempChar: array[0..3000] of Char;
  TempMsg: TMSG;
  TempRect: TRect;
  sh_down: byte;
begin
  sh_down := message.wparam; //當(dāng)拖動時,按下SHIFT鍵時不取消已選單元格
  if freportscale <> 100 then //按下Mouse鍵,并縮放率<>100時,恢復(fù)為正常
  begin //1999.1.23
    freportscale := 100;
    CalcWndSize;
    Update;
    exit;
  end;
  MousePoint.x := LOWORD(Message.lParam);
  MousePoint.y := HIWORD(Message.lParam);
  ThisCell := CellFromPoint(MousePoint);

  //  FcellFont_d:=thiscell.flogfont;

  if IsWindowVisible(FEditWnd) then
  begin
    if FEditCell <> nil then
    begin
      GetWindowText(FEditWnd, TempChar, 3000);
      FEditCell.CellText := TempChar;
    end;
    // 奇怪,ReportControl窗口一旦得到焦點就移動自己
    Windows.SetFocus(0);
    DestroyWindow(FEditWnd);
    FEditCell := nil;
  end;

  // 清除消息隊列中的WM_PAINT消息,防止畫出飛線
  while PeekMessage(TempMsg, 0, WM_PAINT, WM_PAINT, PM_NOREMOVE) do
  begin
    if not GetMessage(TempMsg, 0, WM_PAINT, WM_PAINT) then
      Break;

    DispatchMessage(TempMsg);
  end;

  if ThisCell = nil then
    StartMouseSelect(MousePoint, True, sh_down)
  else
  begin
    TempRect := ThisCell.CellRect;

//    if (abs(TempRect.top - MousePoint.y) <= 5) or (abs(TempRect.Bottom - MousePoint.y) <= 5) or
//      (abs(TempRect.Right - MousePoint.x) <= 5) or (abs(TempRect.left - MousePoint.x) <= 5) then
    if (abs(TempRect.Bottom - MousePoint.y) <= 3) or
      (abs(TempRect.Right - MousePoint.x) <= 3) then
      StartMouseDrag(MousePoint)
    else
      StartMouseSelect(MousePoint, True, sh_down);
    {
        else if abs(TempRect.left - MousePoint.x) <= 5 then
          StartMouseSelect(MousePoint, True)
        else
          StartMouseSelect(MousePoint, False);
    }
  end;
//  inherited;
end;

procedure TReportControl.WMMouseMove(var Message: TMessage);
var
  ThisCell: TReportCell;
  MousePoint: TPoint;
  RectCell: TRect;
begin
  MousePoint.x := LOWORD(Message.lParam);
  MousePoint.y := HIWORD(Message.lParam);
  ThisCell := CellFromPoint(MousePoint);

  if ThisCell <> nil then
  begin
    RectCell := ThisCell.CellRect;

//    CellDisp:=ThisCell;
    FcellFont := thiscell.flogfont; //取Mouse所指單元的字體類型 1999.1.23
//    if (abs(RectCell.Right - MousePoint.x) <= 1) or (abs(RectCell.left - MousePoint.x) <= 1) then
//      SetCursor(LoadCursor(0, IDC_SIZEWE))
//    else if (abs(RectCell.Bottom - MousePoint.y) <= 1) or (abs(RectCell.top - MousePoint.y)<=1) then
//      SetCursor(LoadCursor(0, IDC_SIZENS))
    if (abs(RectCell.Right - MousePoint.x) <= 3) then
      SetCursor(LoadCursor(0, IDC_SIZEWE))
    else if (abs(RectCell.Bottom - MousePoint.y) <= 3) then
      SetCursor(LoadCursor(0, IDC_SIZENS))
    else
      SetCursor(LoadCursor(0, IDC_IBEAM));
  end
  else SetCursor(LoadCursor(0, IDC_ARROW));
  inherited; //將mouse的消息返回   1999.1.23
end;

procedure TReportControl.WMContextMenu(var Message: TMessage);
var
  ThisCell: TReportCell;
  TempPoint: TPoint;
begin
  GetCursorPos(TempPoint);
  Windows.ScreenToClient(Handle, TempPoint);
  ThisCell := CellFromPoint(TempPoint);

  if not IsCellSelected(ThisCell) then
  begin
    RemoveAllSelectedCell;
    if ThisCell <> nil then
    begin
      AddSelectedCell(ThisCell);
    end;
  end;
end;

procedure TReportControl.StartMouseDrag(point: TPoint);
var
  TempCell, TempNextCell, ThisCell, NextCell: TReportCell;
  ThisCellsList: TList;
  TempRect, RectBorder, RectCell, RectClient: TRect;
  hClientDC: HDC;
  hInvertPen, hPrevPen: HPEN;
  PrevDrawMode, PrevCellWidth, Distance: Integer;
  I, J: Integer;
  bHorz, bSelectFlag: Boolean;
  ThisLine, TempLine: TReportLine;
  TempMsg: TMSG;
  BottomCell: TReportCell;
  Top: Integer;
  //  CellList : TList;
  DragBottom: Integer;
begin
  ThisCell := CellFromPoint(point);
  RectCell := ThisCell.CellRect;
  FMousePoint := point;
  Windows.GetClientRect(Handle, RectClient);
  ThisCellsList := TList.Create;

  // 設(shè)置線形和繪制模式
  hClientDC := GetDC(Handle);
  hInvertPen := CreatePen(PS_DOT, 1, RGB(0, 0, 0));
  hPrevPen := SelectObject(hClientDC, hInvertPen);

  PrevDrawMode := SetROP2(hClientDC, R2_NOTXORPEN);

  // 置橫向標(biāo)志
  if abs(RectCell.Bottom - point.y) <= 3 then
    bHorz := True
  else
    bHorz := False;
  // 計算上下左右邊界
  ThisLine := ThisCell.OwnerLine;
  RectBorder.Top := ThisLine.LineTop + 5;
  RectBorder.Bottom := Height - 10;
  RectBorder.Right := ClientRect.Right;

  NextCell := nil;

  for I := 0 to ThisLine.FCells.Count - 1 do
  begin
    TempCell := TReportCell(ThisLine.FCells[I]);

    if ThisCell = TempCell then
    begin
      RectBorder.Left := ThisCell.CellLeft + 10;

      if I < ThisLine.FCells.Count - 1 then
      begin
        NextCell := TReportCell(ThisLine.FCells[I + 1]);
        RectBorder.Right := NextCell.CellLeft + NextCell.CellWidth - 10;
      end
      else
        RectBorder.Right := ClientRect.Right - 10;
    end;
  end;

  if not bHorz then
  begin
    // 若無選中的CELL,或者要改變寬度的CELL和NEXTCELL不在選中區(qū)中
    bSelectFlag := False;

    if FSelectCells.Count <= 0 then
      bSelectFlag := True;

    if NextCell = nil then
    begin
      if (not IsCellSelected(ThisCell)) and (not IsCellSelected(NextCell)) then
        bSelectFlag := True;
    end
    else
      if (not IsCellSelected(ThisCell)) and (not IsCellSelected(NextCell)) and
        (not IsCellSelected(NextCell.OwnerCell)) then
        bSelectFlag := True;

    if bSelectFlag then
    begin
      for I := 0 to FLineList.Count - 1 do
      begin
        TempLine := TReportLine(FLineList[I]);
        for J := 0 to TempLine.FCells.Count - 1 do
        begin
          TempCell := TReportCell(TempLine.FCells[J]);
          // 若該CELL的右邊等于選中的CELL的右邊,將該CELL和NEXTCELL加入到兩個LIST中去
          if TempCell.CellRect.Right = ThisCell.CellRect.Right then
          begin
            ThisCellsList.Add(TempCell);

            if TempCell.CellLeft + 10 > RectBorder.Left then
              RectBorder.Left := TempCell.CellLeft + 10;

            if J < TempLine.FCells.Count - 1 then
            begin
              TempNextCell := TReportCell(TempLine.FCells[J + 1]);
              if TempNextCell.CellRect.Right - 10 < RectBorder.Right then
                RectBorder.Right := TempNextCell.CellRect.Right - 10;
            end;
          end;
        end;
      end;
    end
    else
    begin
      for I := 0 to FLineList.Count - 1 do
      begin
        TempLine := TReportLine(FLineList[I]);
        TempNextCell := nil;
        for J := 0 to TempLine.FCells.Count - 1 do
        begin
          TempCell := TReportCell(TempLine.FCells[J]);
          // 若該CELL的右邊等于選中的CELL的右邊,將該CEL加入到LIST中去
          // 前提是CELL或NEXTCELL在選中區(qū)內(nèi)
          if (TempCell.CellRect.Right = ThisCell.CellRect.Right) then
          begin
            if J < TempLine.FCells.Count - 1 then
              TempNextCell := TReportCell(TempLine.FCells[J + 1]);

            if (not IsCellSelected(TempNextCell)) and (not IsCellSelected(TempCell)) then
              Break;

            if TempNextCell <> nil then
            begin
              if TempNextCell.CellRect.Right - 10 < RectBorder.Right then
                RectBorder.Right := TempNextCell.CellRect.Right - 10;
            end;

            ThisCellsList.Add(TempCell);

            if TempCell.CellLeft + 10 > RectBorder.Left then
              RectBorder.Left := TempCell.CellLeft + 10;

            Break;
          end;
        end;
      end;
    end;
  end;

  // 畫第一條線
  if bHorz then
  begin
    FMousePoint.y := trunc(FMousePoint.y / 5 * 5 + 0.5);

    if FMousePoint.y < RectBorder.Top then
      FMousePoint.y := RectBorder.Top;

    if FMousePoint.y > RectBorder.Bottom then
      FMousePoint.y := RectBorder.Bottom;

    MoveToEx(hClientDC, 0, FMousePoint.y, nil);
    LineTo(hClientDC, RectClient.Right, FMousePoint.y);
    SetCursor(LoadCursor(0, IDC_SIZENS));
  end
  else
  begin
    FMousePoint.x := trunc(FMousePoint.x / 5 * 5 + 0.5);

    if FMousePoint.x < RectBorder.Left then
      FMousePoint.x := RectBorder.Left;

    if FMousePoint.x > RectBorder.Right then
      FMousePoint.x := RectBorder.Right;

    MoveToEx(hClientDC, FMousePoint.x, 0, nil);
    LineTo(hClientDC, FMousePoint.x, RectClient.Bottom);
    SetCursor(LoadCursor(0, IDC_SIZEWE));
  end;

  SetCapture(Handle);

  // 取得鼠標(biāo)輸入,進入第二個消息循環(huán)
  while GetCapture = Handle do
  begin
    if not GetMessage(TempMsg, Handle, 0, 0) then
    begin
      PostQuitMessage(TempMsg.wParam);
      Break;
    end;

    case TempMsg.message of
      WM_LBUTTONUP:
        ReleaseCapture;
      WM_MOUSEMOVE:
        if bHorz then
        begin
          MoveToEx(hClientDC, 0, FMousePoint.y, nil);
          LineTo(hClientDC, RectClient.Right, FMousePoint.y);
          FMousePoint := TempMsg.pt;
          Windows.ScreenToClient(Handle, FMousePoint);

          // 邊界檢查
          FMousePoint.y := trunc(FMousePoint.y / 5 * 5 + 0.5);

          if FMousePoint.y < RectBorder.Top then
            FMousePoint.y := RectBorder.Top;

          if FMousePoint.y > RectBorder.Bottom then
            FMousePoint.y := RectBorder.Bottom;

          MoveToEx(hClientDC, 0, FMousePoint.y, nil);
          LineTo(hClientDC, RectClient.Right, FMousePoint.y);
        end
        else
        begin
          MoveToEx(hClientDC, FMousePoint.x, 0, nil);
          LineTo(hClientDC, FMousePoint.x, RectClient.Bottom);
          FMousePoint := TempMsg.pt;
          Windows.ScreenToClient(Handle, FMousePoint);

          // 邊界檢查
          FMousePoint.x := trunc(FMousePoint.x / 5 * 5 + 0.5);

          if FMousePoint.x < RectBorder.Left then
            FMousePoint.x := RectBorder.Left;
          if FMousePoint.x > RectBorder.Right then
            FMousePoint.x := RectBorder.Right;

          MoveToEx(hClientDC, FMousePoint.x, 0, nil);
          LineTo(hClientDC, FMousePoint.x, RectClient.Bottom);
        end;
      WM_SETCURSOR:
        ;
    else
      DispatchMessage(TempMsg);
    end;
  end;

  if GetCapture = Handle then
    ReleaseCapture;

  if bHorz then
  begin
    // 將反顯的線去掉
    MoveToEx(hClientDC, 0, FMousePoint.y, nil);
    LineTo(hClientDC, RectClient.Right, FMousePoint.y);

    // 改變行高
    // 改變行高
    if ThisCell.FCellsList.Count <= 0 then
    begin
      // 不跨越其他CELL時
      BottomCell := ThisCell;
    end
    else
    begin
      // 跨越其他CELL時,取得最下一行的CELL
      BottomCell := nil;
      Top := 0;
      for I := 0 to ThisCell.FCellsList.Count - 1 do
      begin
        if TReportCell(ThisCell.FCellsList[I]).CellTop > Top then
        begin
          BottomCell := TReportCell(ThisCell.FCellsList[I]);
          Top := BottomCell.CellTop;
        end;
      end;
    end;

    BottomCell.CalcMinCellHeight;
    BottomCell.OwnerLine.LineHeight := FMousePoint.Y - BottomCell.OwnerLine.LineTop;
    UpdateLines;
  end
  else
  begin
    // 將反顯的線去掉
    MoveToEx(hClientDC, FMousePoint.x, 0, nil);
    LineTo(hClientDc, FMousePoint.x, RectClient.Bottom);

    // 在此處判斷對CELL寬度的設(shè)定是否有效
    DragBottom := ThisCellsList.Count;

    for I := 0 to DragBottom - 1 do
    begin
      for J := 0 to TReportCell(ThisCellsList[I]).FCellsList.Count - 1 do
      begin
        ThisCellsList.Add(TReportCell(ThisCellsList[I]).FCellsList[J]);
      end;
    end;

    // 取得NEXTCELL
    if ThisCellsList.Count > 0 then
    begin
      ThisCell := TReportCell(ThisCellsList[0]);
      if ThisCell.CellIndex < ThisCell.OwnerLine.FCells.Count - 1 then
        NextCell := TReportCell(ThisCell.OwnerLine.FCells[ThisCell.CellIndex + 1]);

      // 右邊的CELL不為空且隸屬與某一CELL
      if NextCell <> nil then
      begin
        if NextCell.OwnerCell <> nil then
        begin
          SelectObject(hClientDC, hPrevPen);
          DeleteObject(hInvertPen);
          SetROP2(hClientDc, PrevDrawMode);
          ReleaseDC(Handle, hClientDC);
          Exit;
        end;
      end;

      DragBottom := 0;
      for I := 0 to ThisCellsList.Count - 1 do
      begin
        if TReportCell(ThisCellsList[I]).CellRect.Bottom > DragBottom then
          DragBottom := TReportCell(ThisCellsList[I]).CellRect.Bottom;
      end;

      for I := 0 to ThisCellsList.Count - 1 do
      begin
        ThisCell := TReportCell(ThisCellsList[I]);
        if ThisCel

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91蜜桃网址入口| 一区二区三区精品在线| 久久亚区不卡日本| 日韩成人av影视| 成人av电影免费观看| 欧美日韩国产美| 亚洲欧美日韩系列| 美女在线观看视频一区二区| 成人蜜臀av电影| 精品99一区二区| 免费在线观看不卡| 成人av电影在线网| 日韩一区二区视频| 一区二区三区在线观看视频| 久久精品理论片| 国产美女av一区二区三区| 国产一区二区中文字幕| 99久久伊人精品| 国产精品水嫩水嫩| 久久九九99视频| 国产欧美一区二区三区在线看蜜臀| 欧美二区乱c少妇| 欧美伦理影视网| 久久一夜天堂av一区二区三区| 日韩一区在线看| 成人亚洲一区二区一| 国产91色综合久久免费分享| 蜜桃视频在线一区| 日本成人在线一区| 亚洲成人7777| 9人人澡人人爽人人精品| 精品国产一区二区在线观看| 一区二区三区精品久久久| voyeur盗摄精品| 婷婷六月综合网| 精东粉嫩av免费一区二区三区| 精品久久久久久无| av在线不卡观看免费观看| 一区二区三区四区不卡视频| 91成人国产精品| 激情综合色综合久久综合| 亚洲国产经典视频| 91精品国产一区二区三区蜜臀 | 国产拍揄自揄精品视频麻豆| 成人综合在线观看| 国产丝袜美腿一区二区三区| 精品制服美女久久| 国产精品久久久久久久第一福利 | 亚洲欧美影音先锋| 国产综合一区二区| 欧美国产精品久久| 在线观看视频欧美| 久久66热偷产精品| 久久新电视剧免费观看| 不卡av在线网| 亚洲美女淫视频| 色嗨嗨av一区二区三区| 国产精品毛片大码女人| 在线观看国产一区二区| 色综合视频在线观看| 日本不卡高清视频| av男人天堂一区| 欧美丰满高潮xxxx喷水动漫| 国产精品免费av| 91亚洲男人天堂| 麻豆精品视频在线| 亚洲免费电影在线| www亚洲一区| 精品国产免费久久| 成人激情黄色小说| 激情综合网av| 另类小说欧美激情| 8v天堂国产在线一区二区| 一本久久a久久免费精品不卡| 国产iv一区二区三区| 高清视频一区二区| 成人激情午夜影院| 91麻豆国产精品久久| 色婷婷久久久亚洲一区二区三区| 91免费国产视频网站| 日本高清不卡在线观看| 国产精品资源在线看| 日日夜夜免费精品| 依依成人精品视频| 怡红院av一区二区三区| 国产精品久久久久一区| 久久综合国产精品| 欧美在线播放高清精品| 成人午夜精品一区二区三区| 国产老肥熟一区二区三区| 久久精品国产精品亚洲精品| 亚洲一线二线三线久久久| 国产欧美日本一区视频| 日韩精品一区二区三区swag| 精品一区在线看| 丁香激情综合国产| 国产精品你懂的在线欣赏| 成人app在线观看| 亚洲免费色视频| 欧美日韩一区三区四区| 蜜桃一区二区三区在线观看| 久久综合九色综合欧美就去吻| 成人免费不卡视频| 亚洲一区中文日韩| 欧美一区二区精品| 国产成人免费视频网站| 亚洲欧洲av在线| 欧美日韩精品一区二区| 狠狠色丁香久久婷婷综| 国产精品乱码人人做人人爱| 一本到不卡免费一区二区| 日韩av一区二区在线影视| 久久综合网色—综合色88| 成人久久18免费网站麻豆 | 美女www一区二区| 国产色婷婷亚洲99精品小说| 99久久99久久精品国产片果冻| 亚洲综合一区二区| 精品黑人一区二区三区久久 | 一区二区三区在线免费观看| 欧美肥大bbwbbw高潮| 国产91精品一区二区| 亚洲国产一区二区三区青草影视| 精品国产青草久久久久福利| 91亚洲国产成人精品一区二三| 日韩精品亚洲专区| 国产亚洲欧洲997久久综合 | 日本不卡一区二区| 国产欧美久久久精品影院| 欧美在线一区二区三区| 九色综合狠狠综合久久| 亚洲女与黑人做爰| 久久婷婷国产综合国色天香| 91看片淫黄大片一级在线观看| 免费欧美在线视频| 一区二区三区在线播| 久久久综合精品| 欧美日韩电影在线| 99久久亚洲一区二区三区青草| 久草精品在线观看| 午夜视频在线观看一区| 国产精品福利一区二区| 日韩欧美一区二区久久婷婷| 在线一区二区视频| 国产ts人妖一区二区| 麻豆国产精品官网| 亚洲国产成人va在线观看天堂| 国产日韩欧美激情| 91精品国模一区二区三区| 91蝌蚪porny| 成人av午夜电影| 激情另类小说区图片区视频区| 亚洲成人一区在线| 亚洲色图一区二区三区| 久久久久久电影| 欧美一卡2卡3卡4卡| 91国偷自产一区二区开放时间 | 国产农村妇女精品| 欧美精品一区二区久久婷婷| 3d成人动漫网站| 欧美视频一二三区| 一本一本大道香蕉久在线精品| 国产成人亚洲综合色影视| 蜜臀精品一区二区三区在线观看| 午夜久久久久久久久久一区二区| 亚洲精品久久7777| 亚洲美女偷拍久久| 亚洲欧美自拍偷拍| 国产精品的网站| 国产精品妹子av| 国产欧美日韩视频在线观看| 久久久久成人黄色影片| 精品成人a区在线观看| 日韩三级电影网址| 日韩一级片在线播放| 欧美二区三区的天堂| 337p亚洲精品色噜噜| 欧美精品1区2区3区| 欧美日韩精品一区二区天天拍小说| 欧美亚洲动漫另类| 在线免费不卡电影| 欧美日韩五月天| 欧美日韩黄色影视| 欧美精品日韩精品| 欧美二区三区91| 欧美大片在线观看| 精品国产乱子伦一区| 久久精品水蜜桃av综合天堂| 久久久久久99精品| 国产欧美日韩麻豆91| 欧美国产成人精品| 国产精品免费av| 亚洲私人黄色宅男| 亚洲视频每日更新| 日韩一区二区三区免费看| 欧美日韩色一区| 日韩一区二区免费在线观看| 国产成人综合在线播放| 成人免费高清视频| 日本高清视频一区二区|