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

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

?? reportcontrol.~pa

?? 國產的報表控件
?? ~PA
?? 第 1 頁 / 共 5 頁
字號:

    FEditFont := CreateFontIndirect(ThisCell.LogFont);

    // 設置編輯窗的字體
    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; //當拖動時,按下SHIFT鍵時不取消已選單元格
  if freportscale <> 100 then //按下Mouse鍵,并縮放率<>100時,恢復為正常
  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;

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

  PrevDrawMode := SetROP2(hClientDC, R2_NOTXORPEN);

  // 置橫向標志
  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不在選中區中
    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在選中區內
          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);

  // 取得鼠標輸入,進入第二個消息循環
  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寬度的設定是否有效
    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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本大道久久a久久精品综合| 久久综合九色综合97婷婷| 欧美日韩视频不卡| 国产女人aaa级久久久级| 亚洲国产你懂的| 大尺度一区二区| 精品久久久久久久久久久院品网 | 亚洲午夜久久久久久久久电影网 | 奇米影视一区二区三区| 91美女蜜桃在线| 国产日产欧美一区二区视频| 日本少妇一区二区| 欧美色涩在线第一页| 国产精品卡一卡二| 国产精品88av| 久久女同精品一区二区| 美国av一区二区| 7777精品伊人久久久大香线蕉超级流畅| 国产精品视频一二| 成人黄页毛片网站| 国产欧美日韩卡一| 丁香六月久久综合狠狠色| 2019国产精品| 国产自产v一区二区三区c| 欧美一区二区私人影院日本| 亚洲va天堂va国产va久| 在线免费观看日本欧美| 亚洲一区日韩精品中文字幕| 在线观看亚洲一区| 亚洲成人一区在线| 欧美日韩在线播放三区四区| 五月激情综合网| 制服.丝袜.亚洲.中文.综合| 日韩—二三区免费观看av| 制服丝袜在线91| 美腿丝袜在线亚洲一区| 日韩欧美一二三区| 国产传媒日韩欧美成人| 国产精品久久久一本精品| 972aa.com艺术欧美| 一区二区三区欧美视频| 欧美日韩一区二区三区视频| 天天爽夜夜爽夜夜爽精品视频| 欧美肥胖老妇做爰| 久久成人久久鬼色| 久久久久久亚洲综合影院红桃| 国产成人欧美日韩在线电影| 国产精品丝袜一区| 在线观看一区日韩| 另类小说视频一区二区| 国产日韩av一区| 欧美亚洲图片小说| 九色|91porny| 亚洲欧洲韩国日本视频 | 成人激情黄色小说| 亚洲一级在线观看| 久久人人97超碰com| 成人黄色小视频| 日韩成人午夜电影| 亚洲国产精品成人久久综合一区| 91麻豆国产精品久久| 日韩成人伦理电影在线观看| 欧美激情一区二区三区四区| 欧洲精品视频在线观看| 激情久久五月天| 亚洲免费在线视频一区 二区| 69精品人人人人| 成人美女视频在线观看18| 亚洲国产精品久久不卡毛片| 久久久久亚洲蜜桃| 欧美色综合久久| 丁香六月综合激情| 麻豆精品久久精品色综合| 国产精品福利av| 日韩精品专区在线影院观看 | 国产成人在线视频网址| 亚洲一区二三区| 国产欧美va欧美不卡在线| 欧美人与性动xxxx| 99re热视频这里只精品| 国产一区二区在线电影| 亚洲综合成人在线| 中文天堂在线一区| 欧美电视剧免费观看| 在线精品亚洲一区二区不卡| 成人免费视频视频| 极品尤物av久久免费看| 婷婷丁香激情综合| 亚洲精品视频在线观看网站| 国产欧美精品一区| 欧美精品一区二区三| 欧美午夜影院一区| 在线中文字幕不卡| 不卡一卡二卡三乱码免费网站 | 视频在线观看一区二区三区| 国产精品传媒在线| 国产亚洲精品资源在线26u| 欧美一级日韩一级| 欧美精品久久一区二区三区 | 成人av电影在线播放| 国产中文字幕精品| 久久成人免费网| 伦理电影国产精品| 精品一区二区在线免费观看| 丝袜脚交一区二区| 午夜精品影院在线观看| 亚洲午夜在线观看视频在线| 一区二区三区在线看| 亚洲男帅同性gay1069| 最新国产の精品合集bt伙计| 国产精品乱子久久久久| 中文字幕免费一区| 国产精品高清亚洲| 亚洲男人电影天堂| 一区二区国产视频| 亚洲成人一区二区| 青青草成人在线观看| 精品亚洲国产成人av制服丝袜 | 成人一区二区在线观看| 国产精品一二三区在线| 国产高清无密码一区二区三区| 国产在线精品一区二区夜色| 国产美女在线观看一区| 国产成人一区在线| 成人激情小说网站| 在线精品视频小说1| 91精品国产91热久久久做人人 | 国产精品一区二区久久不卡| 丁香天五香天堂综合| 91视频观看免费| 欧美日韩不卡一区| 日韩美女一区二区三区四区| 久久先锋资源网| 亚洲乱码国产乱码精品精98午夜| 亚洲一区在线免费观看| 蜜桃视频第一区免费观看| 国产曰批免费观看久久久| 成人精品国产福利| 欧美日韩国产在线观看| 26uuu欧美| 一区二区免费在线| 久草这里只有精品视频| 99re成人在线| 91精品国产手机| 国产精品久久网站| 性做久久久久久免费观看| 狠狠色狠狠色综合| 在线亚洲高清视频| 久久精品欧美一区二区三区不卡| 亚洲人成网站精品片在线观看| 天堂在线一区二区| 丁香六月久久综合狠狠色| 欧美日韩国产片| 国产精品二区一区二区aⅴ污介绍| 亚洲超碰精品一区二区| 国产成人综合网| 777亚洲妇女| 亚洲丝袜制服诱惑| 国产一区二区在线影院| 欧美日韩精品福利| 亚洲色图都市小说| 国产在线视视频有精品| 欧美日韩综合不卡| 国产精品美女久久久久久久久 | 久久久美女毛片| 亚洲国产精品一区二区www| 高清不卡在线观看av| 日韩天堂在线观看| 亚洲一区二区三区不卡国产欧美| 国产一区二区美女| 7777精品伊人久久久大香线蕉完整版 | 国产精品嫩草99a| 精品一区二区免费在线观看| 日本韩国欧美三级| 中国色在线观看另类| 国产一区二区三区四区五区美女 | 欧美日本一区二区在线观看| 亚洲欧洲精品天堂一级| 盗摄精品av一区二区三区| 日韩欧美电影一二三| 五月天视频一区| 欧美久久久久久蜜桃| 亚洲色图一区二区| 99视频热这里只有精品免费| 国产亚洲精品超碰| 国产电影一区二区三区| 久久影院午夜片一区| 美女www一区二区| 日韩美女主播在线视频一区二区三区 | 国产伦精品一区二区三区免费| 欧美一级免费大片| 日韩精品成人一区二区在线| 欧美三级资源在线| 亚洲国产精品久久久久秋霞影院| 在线观看视频一区二区欧美日韩| 亚洲日穴在线视频| 色猫猫国产区一区二在线视频| 亚洲欧洲av一区二区三区久久| 成人a免费在线看| 亚洲欧美日韩小说|