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

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

?? tntcontrols.pas

?? TNT Components Source
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
  if  (GetWindowLongW(HWindow, GWL_STYLE) and WS_CHILD <> 0)
  and (GetWindowLongW(HWindow, GWL_ID) = 0) then
    SetWindowLongW(HWindow, GWL_ID, Integer(HWindow));
  SetProp(HWindow, MakeIntAtom(ControlAtom), THandle(CreationControl));
  SetProp(HWindow, MakeIntAtom(WindowAtom), THandle(CreationControl));
  CreationControl := nil;
  Result := TWndProc(ObjectInstance)(HWindow, Message, WParam, lParam);
end;

procedure RegisterUnicodeClass(Params: TCreateParams; out WideWinClassName: WideString; IDEWindow: Boolean = False);
const
  UNICODE_CLASS_EXT = '.UnicodeClass';
var
  TempClass: TWndClassW;
  WideClass: TWndClassW;
  ClassRegistered: Boolean;
  InitialProc: TFNWndProc;
begin
  if IDEWindow then
    InitialProc := @InitWndProc
  else
    InitialProc := @InitWndProcW;

  with Params do begin
    WideWinClassName := WinClassName + UNICODE_CLASS_EXT;
    ClassRegistered := GetClassInfoW(hInstance, PWideChar(WideWinClassName), TempClass);
    if (not ClassRegistered) or (TempClass.lpfnWndProc <> InitialProc)
    then begin
      if ClassRegistered then Win32Check(Windows.UnregisterClassW(PWideChar(WideWinClassName), hInstance));
      // Prepare a TWndClassW record
      WideClass := TWndClassW(WindowClass);
      WideClass.hInstance := hInstance;
      WideClass.lpfnWndProc := InitialProc;
      if not Tnt_Is_IntResource(PWideChar(WindowClass.lpszMenuName)) then begin
        WideClass.lpszMenuName := PWideChar(WideString(WindowClass.lpszMenuName));
      end;
      WideClass.lpszClassName := PWideChar(WideWinClassName);

      // Register the UNICODE class
      if RegisterClassW(WideClass) = 0 then RaiseLastOSError;
    end;
  end;
end;

procedure CreateUnicodeHandle(Control: TWinControl; const Params: TCreateParams;
                                        const SubClass: WideString; IDEWindow: Boolean = False);
var
  TempSubClass: TWndClassW;
  WideWinClassName: WideString;
  Handle: THandle;
begin
  if (not Win32PlatformIsUnicode) then begin
    with Params do
      TAccessWinControl(Control).WindowHandle := CreateWindowEx(ExStyle, WinClassName,
        Caption, Style, X, Y, Width, Height, WndParent, 0, WindowClass.hInstance, Param);
  end else begin
    // SubClass the unicode version of this control by getting the correct DefWndProc
    if (SubClass <> '')
    and GetClassInfoW(Params.WindowClass.hInstance, PWideChar(SubClass), TempSubClass) then
      TAccessWinControl(Control).DefWndProc := TempSubClass.lpfnWndProc
    else
      TAccessWinControl(Control).DefWndProc := @DefWindowProcW;

    // make sure Unicode window class is registered
    RegisterUnicodeClass(Params, WideWinClassName, IDEWindow);

    // Create UNICODE window handle
    UnicodeCreationControl := Control;
    try
      with Params do
        Handle := CreateWindowExW(ExStyle, PWideChar(WideWinClassName), nil,
          Style, X, Y, Width, Height, WndParent, 0, hInstance, Param);
      if Handle = 0 then
        RaiseLastOSError;
      TAccessWinControl(Control).WindowHandle := Handle;
      if IDEWindow then
        SetWindowLongW(Handle, GWL_WNDPROC, GetWindowLong(Handle, GWL_WNDPROC));
    finally
      UnicodeCreationControl := nil;
    end;

    SubClassUnicodeControl(Control, Params.Caption, IDEWindow);
  end;
end;

procedure ReCreateUnicodeWnd(Control: TWinControl; Subclass: WideString; IDEWindow: Boolean = False);
var
  WasFocused: Boolean;
  Params: TCreateParams;
begin
  with TAccessWinControl(Control) do begin
    WasFocused := Focused;
    DestroyHandle;
    CreateParams(Params);
    CreationControl := Control;
    CreateUnicodeHandle(Control, Params, SubClass, IDEWindow);
    StrDispose{TNT-ALLOW StrDispose}(WindowText);
    WindowText := nil;
    Perform(WM_SETFONT, Integer(Font.Handle), 1);
    if AutoSize then AdjustSize;
    UpdateControlState;
    if WasFocused and (WindowHandle <> 0) then Windows.SetFocus(WindowHandle);
  end;
end;

{ TTntCustomHintWindow procs }

function DataPointsToHintInfoForTnt(AData: Pointer): Boolean;
begin
  try
    Result := (AData <> nil)
          and (PHintInfo(AData).HintData = AData) {points to self}
          and (PHintInfo(AData).HintWindowClass.InheritsFrom(TTntCustomHintWindow));
  except
    Result := False;
  end;
end;

function ExtractTntHintCaption(AData: Pointer): WideString;
var
  Control: TControl;
  WideHint: WideString;
  AnsiHintWithShortCut: AnsiString;
  ShortCut: TShortCut;
begin
  Result := PHintInfo(AData).HintStr;
  if Result <> '' then begin
    Control := PHintInfo(AData).HintControl;
    WideHint := WideGetShortHint(WideGetHint(Control));
    if (AnsiString(WideHint) = PHintInfo(AData).HintStr) then
      Result := WideHint
    else if Application.HintShortCuts and (Control <> nil)
    and (Control.Action is TCustomAction{TNT-ALLOW TCustomAction}) then begin
      ShortCut := TCustomAction{TNT-ALLOW TCustomAction}(Control.Action).ShortCut;
      if (ShortCut <> scNone) then
      begin
        AnsiHintWithShortCut := Format{TNT-ALLOW Format}('%s (%s)', [WideHint, ShortCutToText{TNT-ALLOW ShortCutToText}(ShortCut)]);
        if AnsiHintWithShortCut = PHintInfo(AData).HintStr then
          Result := WideFormat('%s (%s)', [WideHint, WideShortCutToText(ShortCut)]);
      end;
    end;
  end;
end;

{ TTntCustomHintWindow }

procedure TTntCustomHintWindow.CreateWindowHandle(const Params: TCreateParams);
begin
  CreateUnicodeHandle(Self, Params, '');
end;

{$IFNDEF COMPILER_7_UP}
procedure TTntCustomHintWindow.CreateParams(var Params: TCreateParams);
const
  CS_DROPSHADOW = $00020000;
begin
  inherited;
  if Win32PlatformIsXP then { Enable drop shadow effect on Windows XP and later. }
    Params.WindowClass.Style := Params.WindowClass.Style or CS_DROPSHADOW;
end;
{$ENDIF}

function TTntCustomHintWindow.GetCaption: TWideCaption;
begin
  Result := TntControl_GetText(Self)
end;

procedure TTntCustomHintWindow.SetCaption(const Value: TWideCaption);
begin
  TntControl_SetText(Self, Value);
end;

procedure TTntCustomHintWindow.Paint;
var
  R: TRect;
begin
  if FBlockPaint then
    exit;
  if (not Win32PlatformIsUnicode) then
    inherited
  else begin
    R := ClientRect;
    Inc(R.Left, 2);
    Inc(R.Top, 2);
    Canvas.Font.Color := Screen.HintFont.Color;
    Tnt_DrawTextW(Canvas.Handle, PWideChar(Caption), -1, R, DT_LEFT or DT_NOPREFIX or
      DT_WORDBREAK or DrawTextBiDiModeFlagsReadingOnly);
  end;
end;

procedure TTntCustomHintWindow.CMTextChanged(var Message: TMessage);
begin
  { Avoid flicker when calling ActivateHint }
  if FActivating then Exit;
  Width := WideCanvasTextWidth(Canvas, Caption) + 6;
  Height := WideCanvasTextHeight(Canvas, Caption) + 6;
end;

procedure TTntCustomHintWindow.ActivateHint(Rect: TRect; const AHint: AnsiString);
var
  SaveActivating: Boolean;
begin
  SaveActivating := FActivating;
  try
    FActivating := True;
    inherited;
  finally
    FActivating := SaveActivating;
  end;
end;

procedure TTntCustomHintWindow.ActivateHintData(Rect: TRect; const AHint: AnsiString; AData: Pointer);
var
  SaveActivating: Boolean;
begin
  if (not Win32PlatformIsUnicode)
  or (not DataPointsToHintInfoForTnt(AData)) then
    inherited
  else begin
    FBlockPaint := True;
    try
      SaveActivating := FActivating;
      try
        FActivating := True;
        inherited;
        Caption := ExtractTntHintCaption(AData);
      finally
        FActivating := SaveActivating;
      end;
    finally
      FBlockPaint := False;
    end;
    Invalidate;
  end;
end;

function TntHintWindow_CalcHintRect(HintWindow: TTntCustomHintWindow; MaxWidth: Integer; const AHint: WideString): TRect;
begin
  Result := Rect(0, 0, MaxWidth, 0);
  Tnt_DrawTextW(HintWindow.Canvas.Handle, PWideChar(AHint), -1, Result, DT_CALCRECT or DT_LEFT or
    DT_WORDBREAK or DT_NOPREFIX or HintWindow.DrawTextBiDiModeFlagsReadingOnly);
  Inc(Result.Right, 6);
  Inc(Result.Bottom, 2);
end;

function TTntCustomHintWindow.CalcHintRect(MaxWidth: Integer; const AHint: AnsiString; AData: Pointer): TRect;
var
  WideHintStr: WideString;
begin
  if (not Win32PlatformIsUnicode)
  or (not DataPointsToHintInfoForTnt(AData)) then
    Result := inherited CalcHintRect(MaxWidth, AHint, AData)
  else begin
    WideHintStr := ExtractTntHintCaption(AData);
    Result := TntHintWindow_CalcHintRect(Self, MaxWidth, WideHintStr);
  end;
end;

{ TTntHintWindow }

procedure TTntHintWindow.ActivateHint(Rect: TRect; const AHint: WideString);
var
  SaveActivating: Boolean;
begin
  SaveActivating := FActivating;
  try
    FActivating := True;
    Caption := AHint;
    inherited ActivateHint(Rect, AHint);
  finally
    FActivating := SaveActivating;
  end;
end;

procedure TTntHintWindow.ActivateHintData(Rect: TRect; const AHint: WideString; AData: Pointer);
var
  SaveActivating: Boolean;
begin
  FBlockPaint := True;
  try
    SaveActivating := FActivating;
    try
      FActivating := True;
      Caption := AHint;
      inherited ActivateHintData(Rect, AHint, AData);
    finally
      FActivating := SaveActivating;
    end;
  finally
    FBlockPaint := False;
  end;
  Invalidate;
end;

function TTntHintWindow.CalcHintRect(MaxWidth: Integer; const AHint: WideString; AData: Pointer): TRect;
begin
  Result := TntHintWindow_CalcHintRect(Self, MaxWidth, AHint);
end;

procedure WideListControl_AddItem(Control: TCustomListControl; const Item: WideString; AObject: TObject);
var
  WideControl: IWideCustomListControl;
begin
  if Control.GetInterface(IWideCustomListControl, WideControl) then
    WideControl.AddItem(Item, AObject)
  else
    Control.AddItem(Item, AObject);
end;

procedure InitControls;

  procedure InitAtomStrings_D6_D7_D9;
  var
    Controls_HInstance: Cardinal;
  begin
    Controls_HInstance := FindClassHInstance(TWinControl);
    WindowAtomString := Format{TNT-ALLOW Format}('Delphi%.8X',[GetCurrentProcessID]);
    ControlAtomString := Format{TNT-ALLOW Format}('ControlOfs%.8X%.8X', [Controls_HInstance, GetCurrentThreadID]);
  end;

  {$IFDEF COMPILER_6} // verified against VCL source in Delphi 6 and BCB 6
  procedure InitAtomStrings;
  begin
    InitAtomStrings_D6_D7_D9;
  end;
  {$ENDIF}
  {$IFDEF DELPHI_7} // verified against VCL source in Delphi 7
  procedure InitAtomStrings;
  begin
    InitAtomStrings_D6_D7_D9;
  end;
  {$ENDIF}
  {$IFDEF DELPHI_9} // verified against VCL source in Delphi 9
  procedure InitAtomStrings;
  begin
    InitAtomStrings_D6_D7_D9;
  end;
  {$ENDIF}
  {$IFDEF DELPHI_10} // verified against VCL source in Delphi 10
  procedure InitAtomStrings;
  begin
    InitAtomStrings_D6_D7_D9;
  end;
  {$ENDIF}

begin
  InitAtomStrings;
  WindowAtom := WinCheckH(GlobalAddAtom(PAnsiChar(WindowAtomString)));
  ControlAtom := WinCheckH(GlobalAddAtom(PAnsiChar(ControlAtomString)));
end;

initialization
  TNT_WM_DESTROY := RegisterWindowMessage('TntUnicodeVcl.DestroyWindow');
  WideControlHelpers := TComponentList.Create(True);
  PendingRecreateWndTrapList := TComponentList.Create(False);
  InitControls;

finalization
  GlobalDeleteAtom(ControlAtom);
  GlobalDeleteAtom(WindowAtom);
  FreeAndNil(WideControlHelpers);
  FreeAndNil(PendingRecreateWndTrapList);
  Finalized := True;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区在线精品| 日韩电影免费一区| 欧美videossexotv100| 99久久精品国产一区| 日本不卡123| 午夜亚洲福利老司机| 国产丝袜欧美中文另类| 日韩欧美国产一区二区三区| 一本一道久久a久久精品| 成人免费观看视频| 国产一区二区三区美女| 日韩—二三区免费观看av| 亚洲蜜臀av乱码久久精品| 国产色一区二区| 久久老女人爱爱| 久久蜜桃av一区精品变态类天堂| 欧美三级日韩在线| 欧美猛男男办公室激情| 色av综合在线| 欧美色精品天天在线观看视频| 日本精品一区二区三区高清| 91女人视频在线观看| 91黄色免费观看| 欧美一级片在线观看| 在线一区二区三区做爰视频网站| 91黄色激情网站| 欧美日韩不卡在线| 欧美xxxxxxxxx| 久久久亚洲欧洲日产国码αv| 国产色综合久久| 一区二区免费在线| 日本成人在线电影网| 国产91精品入口| 色系网站成人免费| 欧美一级高清大全免费观看| 亚洲精品在线免费播放| 国产午夜久久久久| 亚洲一二三区不卡| 国产一二精品视频| 欧美性猛交xxxx乱大交退制版| 欧美一级搡bbbb搡bbbb| 国产精品进线69影院| 日日骚欧美日韩| 成人开心网精品视频| 欧美日韩国产综合草草| 欧美精品一区二区三区高清aⅴ| 国产精品免费视频网站| 五月激情丁香一区二区三区| 国产白丝精品91爽爽久久| 欧美日韩三级一区二区| 国产精品国产自产拍高清av | 欧美电影免费观看高清完整版在| 欧美国产日韩精品免费观看| 三级久久三级久久| 91传媒视频在线播放| 中文字幕乱码亚洲精品一区| 国产91丝袜在线观看| 日韩一区二区高清| 亚洲天堂福利av| 大尺度一区二区| 国产日本亚洲高清| 极品美女销魂一区二区三区免费 | 亚洲国产日产av| 91在线免费播放| 一区在线播放视频| 99久久久无码国产精品| 欧美经典三级视频一区二区三区| 久久不见久久见免费视频1| 91精品国产麻豆国产自产在线| 亚洲精品成人天堂一二三| 91看片淫黄大片一级在线观看| 欧美国产日韩在线观看| 播五月开心婷婷综合| 中文字幕制服丝袜成人av| 成人性生交大片免费看视频在线| 中文字幕第一区| 91小视频在线免费看| 亚洲久草在线视频| 欧美日本一区二区三区四区| 婷婷丁香激情综合| 日韩欧美国产一区二区在线播放| 欧美性猛交xxxxxx富婆| 一区二区三区波多野结衣在线观看| 色94色欧美sute亚洲线路一久| 亚洲一区二区三区在线播放| 欧美日韩亚洲丝袜制服| 日韩av电影免费观看高清完整版 | 国产亚洲一区字幕| 91麻豆精品在线观看| 午夜亚洲福利老司机| 精品美女一区二区| 成人精品一区二区三区中文字幕| 亚洲人成在线播放网站岛国| 色悠悠久久综合| 久久国内精品视频| 中文字幕av一区 二区| 欧美电影一区二区三区| 国产aⅴ综合色| 日韩国产成人精品| 国产精品美日韩| 欧美电影免费观看完整版| 91在线国产福利| 久久91精品久久久久久秒播| 国产精品久久久久久久久免费桃花 | 蓝色福利精品导航| 亚洲婷婷综合色高清在线| 精品免费日韩av| 色婷婷av一区二区三区软件 | 91视频免费看| 国产电影一区二区三区| 日韩激情视频网站| 亚洲视频你懂的| 国产精品理论片在线观看| 精品国产一区二区三区不卡| 欧美性大战久久久| 91美女片黄在线| 色综合天天综合网天天狠天天| 国产69精品久久777的优势| 久久国产视频网| 国产综合久久久久久鬼色| 久久99日本精品| 久久国产综合精品| 国产一区二区调教| 国产精品资源在线| 成人av在线网| 色婷婷亚洲综合| 欧美色精品在线视频| 7777精品伊人久久久大香线蕉经典版下载 | 粉嫩高潮美女一区二区三区 | 亚洲欧美日韩电影| 伊人开心综合网| 亚洲午夜私人影院| 美女视频免费一区| 国产一区二区三区在线观看免费| 久久99国产精品久久| 成人国产精品免费观看动漫| 色综合久久综合网97色综合| av一区二区三区| 欧美日韩一区 二区 三区 久久精品| 欧美在线|欧美| 日韩欧美一区二区视频| 国产喂奶挤奶一区二区三区| 亚洲精品国产高清久久伦理二区| 亚洲bdsm女犯bdsm网站| 国产一级精品在线| 精品视频在线看| 久久综合狠狠综合久久综合88| 日本一区二区视频在线观看| 亚洲狠狠丁香婷婷综合久久久| 日本在线播放一区二区三区| 成人动漫av在线| 日韩欧美一区电影| 亚洲综合在线免费观看| 国产精品一卡二卡在线观看| 欧美美女一区二区在线观看| 国产日韩精品视频一区| 精品亚洲aⅴ乱码一区二区三区| 91热门视频在线观看| 亚洲精品免费一二三区| 国产在线精品免费| 欧美日韩国产一级片| 最新热久久免费视频| 国产成人亚洲综合a∨婷婷图片 | 午夜精品久久久久久久久| 成人午夜电影久久影院| 久久先锋影音av鲁色资源网| 奇米888四色在线精品| 欧美体内she精高潮| 亚洲精品水蜜桃| 欧美亚日韩国产aⅴ精品中极品| 中文字幕第一区第二区| 成人一级黄色片| 欧美国产一区在线| eeuss鲁一区二区三区| 欧美国产1区2区| 国产成人自拍网| 国产精品美女一区二区三区| 国产精品18久久久| 亚洲国产精品激情在线观看| 粉嫩13p一区二区三区| 国产女同性恋一区二区| 不卡的电影网站| 亚洲一级二级三级| 欧美一区二视频| 狠狠久久亚洲欧美| 国产精品午夜在线| 欧洲另类一二三四区| 日韩—二三区免费观看av| 精品国产精品网麻豆系列| 成人永久免费视频| 亚洲一区二区影院| 精品噜噜噜噜久久久久久久久试看| 国产老肥熟一区二区三区| 国产精品女主播在线观看| 欧美三级日本三级少妇99| 裸体一区二区三区| 亚洲乱码日产精品bd| 欧美一区二区精美| 在线影视一区二区三区| 国产一区二区调教|