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

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

?? tntcontrols.pas

?? Delphi知道現(xiàn)在也沒有提供Unicode支持
?? PAS
?? 第 1 頁 / 共 3 頁
字號(hào):
  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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一二三区在线| 日韩一级片在线播放| 一区二区三区中文字幕| 午夜精品免费在线| 欧美亚洲禁片免费| 一区二区三区欧美在线观看| av在线不卡网| 中文字幕在线不卡国产视频| 国产成人在线视频网站| 久久亚洲春色中文字幕久久久| 一区二区三区在线观看动漫| 一本久久a久久免费精品不卡| 欧美精品一区二区久久婷婷 | 欧美一级xxx| 日韩一区精品字幕| 日韩亚洲欧美成人一区| 亚洲国产精品久久久男人的天堂| 91麻豆精品国产91久久久久久| 日本不卡视频在线观看| 精品日韩一区二区三区免费视频| 国内精品伊人久久久久av一坑| 欧美成人激情免费网| 国产一区二区不卡在线| 国产亚洲精品7777| 91亚洲精品久久久蜜桃| 亚洲国产wwwccc36天堂| 欧美精品一区二区三区在线| a级高清视频欧美日韩| 亚洲精品写真福利| 久久伊99综合婷婷久久伊| 黑人巨大精品欧美黑白配亚洲| 日韩欧美资源站| 99久久精品国产毛片| 国产在线国偷精品产拍免费yy| 国产亚洲成年网址在线观看| 一本色道综合亚洲| 蜜臀av国产精品久久久久| 国产日韩精品一区二区三区 | 国产成人av电影在线播放| 亚洲欧美色图小说| 日韩美女一区二区三区四区| 色综合天天综合在线视频| 国产中文一区二区三区| 亚洲国产va精品久久久不卡综合 | 欧美欧美欧美欧美| 色美美综合视频| 不卡在线观看av| 美女任你摸久久| 日本不卡一区二区| 亚洲欧美乱综合| 26uuu色噜噜精品一区二区| 欧美在线观看一区| 亚洲国产视频在线| 亚洲欧美一区二区三区国产精品 | 在线成人免费视频| 色天天综合久久久久综合片| 国产精品一区一区| 亚洲国产日韩精品| 日本三级亚洲精品| 精品无人码麻豆乱码1区2区| 风间由美一区二区av101| 亚洲视频在线一区二区| 久久精品一区四区| 国产精品国产三级国产a | www国产精品av| 久久日一线二线三线suv| 精品卡一卡二卡三卡四在线| 国产日韩欧美综合在线| 日韩一区日韩二区| 日韩影院精彩在线| 国产大片一区二区| 成人激情文学综合网| 欧洲av在线精品| 337p粉嫩大胆噜噜噜噜噜91av | 精品视频1区2区| 日韩欧美二区三区| 亚洲男女一区二区三区| 奇米四色…亚洲| 色综合天天综合狠狠| 欧美一区二区三区男人的天堂| 国产亚洲精品超碰| 亚洲黄色在线视频| 国内精品免费在线观看| 91九色最新地址| 欧美国产视频在线| 三级精品在线观看| 一本色道**综合亚洲精品蜜桃冫| 欧美一级日韩免费不卡| 一区二区三区在线观看动漫| 国产一区二区三区四区五区入口| 欧美性一区二区| 日韩美女啊v在线免费观看| 精品一区中文字幕| 精品美女一区二区| 午夜精品视频在线观看| 欧美精品aⅴ在线视频| 综合精品久久久| 处破女av一区二区| 香港成人在线视频| 久久这里都是精品| 成人av免费网站| 国产伦理精品不卡| 亚洲免费观看在线观看| 日韩欧美一区二区免费| 国产成人av电影在线播放| 亚洲天堂2016| 欧美在线色视频| 91亚洲精品久久久蜜桃| 中文字幕一区二区三区av| 丁香一区二区三区| 亚洲另类一区二区| 日韩欧美你懂的| 国产成人精品免费网站| 国产精品国产三级国产普通话蜜臀 | 亚洲一二三四在线观看| 欧美一区二区成人6969| 韩国精品一区二区| 亚洲免费资源在线播放| 欧美日韩一区成人| 国产一区二区三区不卡在线观看| 国产拍欧美日韩视频二区| 日本道免费精品一区二区三区| 亚洲1区2区3区视频| 国产精品丝袜一区| 99亚偷拍自图区亚洲| 日韩欧美aaaaaa| 老色鬼精品视频在线观看播放| 日韩亚洲国产中文字幕欧美| 亚洲国产精品人人做人人爽| 欧美视频第二页| 午夜精品在线看| 日韩一区二区三区四区五区六区 | 欧美剧在线免费观看网站 | 精品久久人人做人人爰| 成人av网站在线| 久久er精品视频| 午夜精品福利一区二区蜜股av| 久久亚洲影视婷婷| 日韩一二三区不卡| av激情综合网| 国产69精品一区二区亚洲孕妇| 一区二区三区四区视频精品免费| 国产日韩精品久久久| 日韩精品一区二区三区四区| 欧美精品久久一区| 欧美精品欧美精品系列| 91福利国产精品| 精品视频在线免费看| 国产高清成人在线| eeuss鲁一区二区三区| 不卡一区在线观看| 在线观看日韩毛片| 欧美日韩成人综合天天影院 | 91精品在线麻豆| 91精品国产一区二区| 欧美电视剧在线看免费| 久久久久久电影| 国产精品免费网站在线观看| 中文字幕制服丝袜一区二区三区| 欧美国产国产综合| 亚洲网友自拍偷拍| 麻豆国产精品一区二区三区| 美女性感视频久久| 国产精品综合久久| 精品一区二区三区的国产在线播放| 国产精品午夜在线| 精品久久国产老人久久综合| 国产盗摄一区二区| 亚洲精品视频免费看| 国产欧美日韩视频在线观看| 欧美xfplay| 精品国产凹凸成av人导航| 欧美电影在哪看比较好| 欧美日韩你懂得| 91.成人天堂一区| 8x8x8国产精品| 精品国产乱码久久久久久久久| 日韩精品专区在线影院重磅| 精品国内二区三区| 久久婷婷色综合| 亚洲欧美一区二区三区极速播放 | 精品成人免费观看| 久久老女人爱爱| 国产精品久久久久久久久久免费看 | 中文字幕在线视频一区| 中文字幕综合网| 久久精品99国产精品日本| ...av二区三区久久精品| 欧美日韩一区二区三区视频| 欧美激情一区二区三区四区| 日韩精品一二三区| 粗大黑人巨茎大战欧美成人| 国产麻豆视频一区二区| 91丨九色丨蝌蚪富婆spa| 中文字幕欧美三区| 国产不卡在线一区| 在线综合+亚洲+欧美中文字幕| 激情综合网激情| 日韩免费一区二区| 三级欧美在线一区|