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

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

?? tntforms.pas

?? TNT Components Source
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
  FindKind: TFindItemKind;
begin
  if Menu <> nil then
    with Message do
    begin
      MenuItem := nil;
      if (MenuFlag <> $FFFF) or (IDItem <> 0) then
      begin
        FindKind := fkCommand;
        ID := IDItem;
        if MenuFlag and MF_POPUP <> 0 then
        begin
          FindKind := fkHandle;
          ID := Integer(GetSubMenu(Menu, ID));
        end;
        MenuItem := Self.Menu.FindItem(ID, FindKind);
      end;
      if MenuItem <> nil then
        TntApplication.Hint := WideGetLongHint(WideGetMenuItemHint(MenuItem))
      else
        TntApplication.Hint := '';
    end;
end;

procedure TTntForm.UpdateActions;
begin
  inherited;
  TntApplication.DoIdle;
end;

procedure TTntForm.CMBiDiModeChanged(var Message: TMessage);
var
  Loop: Integer;
begin
  inherited;
  for Loop := 0 to ComponentCount - 1 do
    if Components[Loop] is TMenu then
      FixMenuBiDiProblem(TMenu(Components[Loop]));
end;

procedure TTntForm.WMWindowPosChanging(var Message: TMessage);
begin
  inherited;
  // This message *sometimes* means that the Menu.BiDiMode changed.
  FixMenuBiDiProblem(Menu);
end;

function TTntForm.CreateDockManager: IDockManager;
begin
  if (DockManager = nil) and DockSite and UseDockManager then
    HandleNeeded; // force TNT subclassing to occur first
  Result := inherited CreateDockManager;
end;

{ TTntApplication }

constructor TTntApplication.Create(AOwner: TComponent);
begin
  inherited;
  Application.HookMainWindow(WndProc);
  FSettingChangeTime := GetTickCount;
  TntSysUtils._SettingChangeTime := GetTickCount;
end;

destructor TTntApplication.Destroy;
begin
  FreeAndNil(FTntAppIdleEventControl);
  Application.UnhookMainWindow(WndProc);
  inherited;
end;

function TTntApplication.GetHint: WideString;
begin
  // check to see if the hint has already been set on application.idle
  if Application.Hint = AnsiString(ApplicationMouseControlHint) then
    FHint := ApplicationMouseControlHint;
  // get the synced string
  Result := GetSyncedWideString(FHint, Application.Hint)
end;

procedure TTntApplication.SetAnsiAppHint(const Value: AnsiString);
begin
  Application.Hint := Value;
end;

procedure TTntApplication.SetHint(const Value: WideString);
begin
  SetSyncedWideString(Value, FHint, Application.Hint, SetAnsiAppHint);
end;

function TTntApplication.GetExeName: WideString;
begin
  Result := WideParamStr(0);
end;

function TTntApplication.GetTitle: WideString;
begin
  if (Application.Handle <> 0) and Win32PlatformIsUnicode then begin
    SetLength(Result, DefWindowProcW(Application.Handle, WM_GETTEXTLENGTH, 0, 0) + 1);
    DefWindowProcW(Application.Handle, WM_GETTEXT, Length(Result), Integer(PWideChar(Result)));
    SetLength(Result, Length(Result) - 1);
  end else
    Result := GetSyncedWideString(FTitle, Application.Title);
end;

procedure TTntApplication.SetAnsiApplicationTitle(const Value: AnsiString);
begin
  Application.Title := Value;
end;

procedure TTntApplication.SetTitle(const Value: WideString);
begin
  if (Application.Handle <> 0) and Win32PlatformIsUnicode then begin
    if (GetTitle <> Value) or (FTitle <> '') then begin
      DefWindowProcW(Application.Handle, WM_SETTEXT, 0, lParam(PWideChar(Value)));
      FTitle := '';
    end
  end else
    SetSyncedWideString(Value, FTitle, Application.Title, SetAnsiApplicationTitle);
end;

{$IFDEF COMPILER_6} // verified against VCL source in Delphi 6 and BCB 6
type
  THackApplication = class(TComponent)
  protected
    FxxxxxxxxxHandle: HWnd;
    FxxxxxxxxxBiDiMode: TBiDiMode;
    FxxxxxxxxxBiDiKeyboard: AnsiString;
    FxxxxxxxxxNonBiDiKeyboard: AnsiString;
    FxxxxxxxxxObjectInstance: Pointer;
    FxxxxxxxxxMainForm: TForm{TNT-ALLOW TForm};
    FMouseControl: TControl;
  end;
{$ENDIF}
{$IFDEF DELPHI_7} // verified against VCL source in Delphi 7
type
  THackApplication = class(TComponent)
  protected
    FxxxxxxxxxHandle: HWnd;
    FxxxxxxxxxBiDiMode: TBiDiMode;
    FxxxxxxxxxBiDiKeyboard: AnsiString;
    FxxxxxxxxxNonBiDiKeyboard: AnsiString;
    FxxxxxxxxxObjectInstance: Pointer;
    FxxxxxxxxxMainForm: TForm{TNT-ALLOW TForm};
    FMouseControl: TControl;
  end;
{$ENDIF}
{$IFDEF DELPHI_9} // verified against VCL source in Delphi 9
type
  THackApplication = class(TComponent)
  protected
    FxxxxxxxxxHandle: HWnd;
    FxxxxxxxxxBiDiMode: TBiDiMode;
    FxxxxxxxxxBiDiKeyboard: AnsiString;
    FxxxxxxxxxNonBiDiKeyboard: AnsiString;
    FxxxxxxxxxObjectInstance: Pointer;
    FxxxxxxxxxMainForm: TForm{TNT-ALLOW TForm};
    FMouseControl: TControl;
  end;
{$ENDIF}
{$IFDEF DELPHI_10} // verified against VCL source in Delphi 10
type
  THackApplication = class(TComponent)
  protected
    FxxxxxxxxxHandle: HWnd;
    FxxxxxxxxxBiDiMode: TBiDiMode;
    FxxxxxxxxxBiDiKeyboard: AnsiString;
    FxxxxxxxxxNonBiDiKeyboard: AnsiString;
    FxxxxxxxxxObjectInstance: Pointer;
    FxxxxxxxxxMainForm: TForm{TNT-ALLOW TForm};
    FMouseControl: TControl;
  end;
{$ENDIF}

function TTntApplication.ApplicationMouseControlHint: WideString;
var
  MouseControl: TControl;
begin
  MouseControl := THackApplication(Application).FMouseControl;
  Result := WideGetLongHint(WideGetHint(MouseControl));
end;

procedure TTntApplication.DoIdle;
begin
  // update TntApplication.Hint only when Ansi encodings are the same... (otherwise there are problems with action menus)
  if Application.Hint = AnsiString(ApplicationMouseControlHint) then
    Hint := ApplicationMouseControlHint;
end;

function TTntApplication.IsDlgMsg(var Msg: TMsg): Boolean;
begin
  Result := False;
  if (Application.DialogHandle <> 0) then begin
    if IsWindowUnicode(Application.DialogHandle) then
      Result := IsDialogMessageW(Application.DialogHandle, Msg)
    else
      Result := IsDialogMessageA(Application.DialogHandle, Msg);
  end;
end;

type
  TTntAppIdleEventControl = class(TControl)
  protected
    procedure OnIdle(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

constructor TTntAppIdleEventControl.Create(AOwner: TComponent);
begin
  inherited;
  ParentFont := False; { This allows Parent (Application) to be in another module. }
  Parent := Application.MainForm;
  Visible := True;
  Action := TTntAction.Create(Self);
  Action.OnExecute := OnIdle;
  Action.OnUpdate := OnIdle;
  TntApplication.FTntAppIdleEventControl := Self;
end;

destructor TTntAppIdleEventControl.Destroy;
begin
  if TntApplication <> nil then
    TntApplication.FTntAppIdleEventControl := nil;
  inherited;
end;

procedure TTntAppIdleEventControl.OnIdle(Sender: TObject);
begin
  TntApplication.DoIdle;
end;

function TTntApplication.ProcessMessage(var Msg: TMsg): Boolean;
var
  Handled: Boolean;
begin
  Result := False;
  // Check Main Form
  if (not FMainFormChecked) and (Application.MainForm <> nil) then begin
    if not (Application.MainForm is TTntForm) then begin
      // This control will help ensure that DoIdle is called
      TTntAppIdleEventControl.Create(Application.MainForm);
    end;
    FMainFormChecked := True;
  end;
  // Check for Unicode char messages
  if (Msg.message = WM_CHAR)
  and (Msg.wParam > Integer(High(AnsiChar)))
  and IsWindowUnicode(Msg.hwnd)
  and ((Application.DialogHandle = 0) or IsWindowUnicode(Application.DialogHandle))
  then begin
    Result := True;
    // more than 8-bit WM_CHAR destined for Unicode window
    Handled := False;
    if Assigned(Application.OnMessage) then
      Application.OnMessage(Msg, Handled);
    Application.CancelHint;
    // dispatch msg if not a dialog message
    if (not Handled) and (not IsDlgMsg(Msg)) then
      DispatchMessageW(Msg);
  end;
end;

function TTntApplication.WndProc(var Message: TMessage): Boolean;
var
  BasicAction: TBasicAction;
begin
  Result := False; { not handled }
  if (Message.Msg = WM_SETTINGCHANGE) then begin
    FSettingChangeTime := GetTickCount;
    TntSysUtils._SettingChangeTime := FSettingChangeTime;
  end;
  if (Message.Msg = WM_CREATE)
  and (FTitle <> '') then begin
    SetTitle(FTitle);
    FTitle := '';
  end;
  if (Message.Msg = CM_ACTIONEXECUTE) then begin
    BasicAction := TBasicAction(Message.LParam);
    if (BasicAction.ClassType = THintAction{TNT-ALLOW THintAction})
    and (THintAction{TNT-ALLOW THintAction}(BasicAction).Hint = AnsiString(Hint))
    then begin
      Result := True;
      Message.Result := 1;
      with TTntHintAction.Create(Self) do
      begin
        Hint := Self.Hint;
        try
          Execute;
        finally
          Free;
        end;
      end;
    end;
  end;
end;

//===========================================================================
//   The NT GetMessage Hook is needed to support entering Unicode
//     characters directly from the keyboard (bypassing the IME).
//   Special thanks go to Francisco Leong for developing this solution.
//
//  Example:
//    1. Install "Turkic" language support.
//    2. Add "Azeri (Latin)" as an input locale.
//    3. In an EDIT, enter Shift+I.  (You should see a capital "I" with dot.)
//    4. In an EDIT, enter single quote (US Keyboard).  (You should see an upturned "e".)
//
var
  ManualPeekMessageWithRemove: Integer = 0;

procedure EnableManualPeekMessageWithRemove;
begin
  Inc(ManualPeekMessageWithRemove);
end;

procedure DisableManualPeekMessageWithRemove;
begin
  if (ManualPeekMessageWithRemove > 0) then
    Dec(ManualPeekMessageWithRemove);
end;

var
  NTGetMessageHook: HHOOK;

function GetMessageForNT(Code: Integer; wParam: Integer; lParam: Integer): LRESULT; stdcall;
var
  ThisMsg: PMSG;
begin
  if (Code >= 0)
  and (wParam = PM_REMOVE)
  and (ManualPeekMessageWithRemove = 0) then
  begin
    ThisMsg := PMSG(lParam);
    if (TntApplication <> nil)
    and TntApplication.ProcessMessage(ThisMsg^) then
      ThisMsg.message := WM_NULL; { clear for further processing }
  end;
  Result := CallNextHookEx(NTGetMessageHook, Code, wParam, lParam);
end;

procedure CreateGetMessageHookForNT;
begin
  Assert(Win32Platform = VER_PLATFORM_WIN32_NT);
  NTGetMessageHook := SetWindowsHookExW(WH_GETMESSAGE, GetMessageForNT, 0, GetCurrentThreadID);
  if NTGetMessageHook = 0 then
    RaiseLastOSError;
end;

//---------------------------------------------------------------------------------------------
//                                 Tnt Environment Setup
//---------------------------------------------------------------------------------------------

procedure InitTntEnvironment;

    function GetDefaultFont: WideString;

        function RunningUnderIDE: Boolean;
        begin
          Result := ModuleIsPackage and
            (    WideSameText(WideExtractFileName(WideGetModuleFileName(0)), 'bds.exe')
              or WideSameText(WideExtractFileName(WideGetModuleFileName(0)), 'delphi32.exe')
              or WideSameText(WideExtractFileName(WideGetModuleFileName(0)), 'bcb.exe'));
        end;

        function GetProfileStr(const Section, Key, Default: AnsiString; MaxLen: Integer): AnsiString;
        var
          Len: Integer;
        begin
          SetLength(Result, MaxLen + 1);
          Len := GetProfileString(PAnsiChar(Section), PAnsiChar(Key), PAnsiChar(Default),
            PAnsiChar(Result), Length(Result));
          SetLength(Result, Len);
        end;

        procedure SetProfileStr(const Section, Key, Value: AnsiString);
        var
          DummyResult: Cardinal;
        begin
          try
            Win32Check(WriteProfileString(PAnsiChar(Section), PAnsiChar(Key), PAnsiChar(Value)));
            if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
              WriteProfileString(nil, nil, nil); {this flushes the WIN.INI cache}
            SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, Integer(PAnsiChar(Section)),
              SMTO_NORMAL, 250, DummyResult);
          except
            on E: Exception do begin
              E.Message := 'Couldn''t create font substitutes.' + CRLF + E.Message;
              Application.HandleException(nil);
            end;
          end;
        end;

    var
      ShellDlgFontName_1: WideString;
      ShellDlgFontName_2: WideString;
    begin
      ShellDlgFontName_1 := GetProfileStr('FontSubstitutes', 'MS Shell Dlg', '', LF_FACESIZE);
      if ShellDlgFontName_1 = '' then begin
        ShellDlgFontName_1 := 'MS Sans Serif';
        SetProfileStr('FontSubstitutes', 'MS Shell Dlg', ShellDlgFontName_1);
      end;
      ShellDlgFontName_2 := GetProfileStr('FontSubstitutes', 'MS Shell Dlg 2', '', LF_FACESIZE);
      if ShellDlgFontName_2 = '' then begin
        if Screen.Fonts.IndexOf('Tahoma') <> -1 then
          ShellDlgFontName_2 := 'Tahoma'
        else
          ShellDlgFontName_2 := ShellDlgFontName_1;
        SetProfileStr('FontSubstitutes', 'MS Shell Dlg 2', ShellDlgFontName_2);
      end;
      if RunningUnderIDE then begin
        Result := 'MS Shell Dlg 2' {Delphi is running}
      end else
        Result := ShellDlgFontName_2;
    end;

begin
  // Tnt Environment Setup
  InstallTntSystemUpdates;
  DefFontData.Name := GetDefaultFont;
  Forms.HintWindowClass := TntControls.TTntHintWindow;
end;

initialization
  TntApplication := TTntApplication.Create(nil);
  if Win32Platform = VER_PLATFORM_WIN32_NT then
    CreateGetMessageHookForNT;

finalization
  if NTGetMessageHook <> 0 then begin
    UnhookWindowsHookEx(NTGetMessageHook) // no Win32Check, fails in too many cases, and doesn't matter
  end;
  FreeAndNil(TntApplication);

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩亚洲欧美高清| 久久伊人蜜桃av一区二区| 日韩一区二区高清| 亚洲欧洲美洲综合色网| 日韩精品国产精品| 色综合天天综合网国产成人综合天| 91麻豆精品国产91久久久使用方法| 国产精品少妇自拍| 精品无人码麻豆乱码1区2区| 一本色道久久加勒比精品| 久久久久久久久久久黄色| 亚洲成av人**亚洲成av**| 不卡的av在线| 中文字幕av资源一区| 久久成人久久鬼色| 欧美夫妻性生活| 一二三四社区欧美黄| 成人av在线一区二区| 久久人人超碰精品| 蜜桃一区二区三区在线观看| 欧美影院一区二区| 亚洲欧美日韩小说| 一本久久综合亚洲鲁鲁五月天| 中文字幕高清不卡| 成人午夜在线免费| 日本一区免费视频| 国产福利一区二区三区视频| 欧美sm极限捆绑bd| 激情欧美一区二区三区在线观看| 9191国产精品| 日本中文字幕一区| 欧美一级高清片在线观看| 亚洲成年人网站在线观看| 欧美图片一区二区三区| 夜夜揉揉日日人人青青一国产精品| 91网站在线观看视频| 亚洲同性同志一二三专区| 99国产欧美久久久精品| 亚洲激情男女视频| 91国模大尺度私拍在线视频| 亚洲激情综合网| 欧美猛男gaygay网站| 日韩在线卡一卡二| 日韩欧美一级特黄在线播放| 狠狠色综合日日| 中文字幕不卡三区| 在线观看免费一区| 日日夜夜精品视频天天综合网| 欧美一级搡bbbb搡bbbb| 精品一区二区三区在线视频| 国产肉丝袜一区二区| 99久久精品免费精品国产| 亚洲成国产人片在线观看| 日韩小视频在线观看专区| 国产风韵犹存在线视精品| 国产精品电影院| 欧美日韩视频不卡| 国产一区二区在线看| 亚洲精品国久久99热| 欧美一区二区在线视频| 国产精品正在播放| 一区二区三区在线观看视频| 91精品国产一区二区人妖| 久久99精品久久久久久动态图| 欧美国产成人在线| 7777精品伊人久久久大香线蕉超级流畅| 美女一区二区久久| 国产精品久久久久一区二区三区| 欧美三级日韩三级| 国产精品一区二区在线播放| 亚洲一区二区四区蜜桃| 精品国产伦一区二区三区观看方式| 成人黄色a**站在线观看| 亚洲图片自拍偷拍| 国产精品剧情在线亚洲| 91精品欧美福利在线观看| 成人免费视频网站在线观看| 亚洲成人手机在线| 国产精品久久久久久久久免费樱桃| 欧美日韩精品一区二区| 国产91丝袜在线播放九色| 五月婷婷久久丁香| 亚洲欧洲一区二区在线播放| 这里只有精品99re| 色婷婷亚洲精品| 成人综合激情网| 久色婷婷小香蕉久久| 亚洲国产精品久久人人爱蜜臀| 国产女同性恋一区二区| 日韩欧美视频一区| 欧美日韩国产首页| 91丨porny丨首页| 岛国av在线一区| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲午夜一区二区三区| 亚洲卡通欧美制服中文| 国产欧美日韩麻豆91| 精品国产一区二区精华| 欧美一区二区三区四区五区| 欧美日韩色一区| 欧美亚洲日本国产| 91浏览器在线视频| 不卡视频一二三| www.欧美日韩国产在线| 国产精品亚洲人在线观看| 国产真实精品久久二三区| 麻豆免费精品视频| 性做久久久久久久久| 亚洲成人av电影在线| 水蜜桃久久夜色精品一区的特点| 亚洲精品乱码久久久久久久久 | 欧美一区二区三区日韩视频| 色综合久久久网| 在线观看视频一区二区| 色综合久久天天综合网| 色综合久久综合中文综合网| 99re视频精品| 在线一区二区观看| 欧美中文字幕不卡| 欧美日韩国产在线观看| 欧美日韩久久久久久| 91精品午夜视频| 久久伊人蜜桃av一区二区| 26uuu亚洲综合色欧美| 国产亚洲福利社区一区| 欧美激情艳妇裸体舞| 亚洲人成影院在线观看| 亚洲精品视频在线观看免费| 午夜一区二区三区视频| 另类调教123区 | 欧美综合在线视频| 欧美色老头old∨ideo| 欧美精品vⅰdeose4hd| 日韩欧美在线1卡| 国产欧美一区二区精品性 | 久久一二三国产| 国产精品天干天干在观线| 一区二区三区在线影院| 日韩一区精品字幕| 国产美女在线精品| 色婷婷av一区二区三区之一色屋| 欧美日韩亚洲综合在线| 精品国产一区久久| 亚洲精品成人精品456| 蜜臀av性久久久久av蜜臀妖精 | 日韩国产欧美在线播放| 九九九精品视频| 99久久国产综合精品色伊| 欧美乱熟臀69xxxxxx| 精品成人a区在线观看| 亚洲日本成人在线观看| 午夜精品久久久久久不卡8050| 久久精品久久精品| 91免费视频观看| 欧美精品一区二区久久婷婷| 亚洲男人天堂av网| 日本免费新一区视频| 99精品国产热久久91蜜凸| 日韩一区二区在线观看| 中文字幕一区二区5566日韩| 免费一区二区视频| 一本一本大道香蕉久在线精品| 欧美本精品男人aⅴ天堂| 夜夜精品浪潮av一区二区三区| 国产精品1区二区.| 在线播放欧美女士性生活| 亚洲欧美日韩精品久久久久| 国产一区二区三区四区五区美女 | 成人一二三区视频| 欧美一区二区视频在线观看| 国产精品二三区| 国产在线乱码一区二区三区| 欧美日韩中文国产| 亚洲欧洲国产日本综合| 国产一区二三区| 欧美v国产在线一区二区三区| 亚洲一区二区在线免费观看视频| 成人手机电影网| 国产亚洲欧美日韩在线一区| 日本特黄久久久高潮| 欧美日韩视频专区在线播放| 亚洲免费三区一区二区| 成人av电影免费观看| 国产亚洲自拍一区| 国产在线精品一区二区夜色| 91精品国产麻豆| 日欧美一区二区| 欧美日韩高清一区二区三区| 亚洲综合男人的天堂| av中文字幕一区| 国产精品乱人伦一区二区| 成人丝袜视频网| 国产精品伦理在线| 不卡av电影在线播放| 国产精品美女久久福利网站| fc2成人免费人成在线观看播放 | 宅男噜噜噜66一区二区66| 亚洲成在人线免费| 欧美日韩一区二区三区高清| 亚洲大片免费看|