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

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

?? tntstdctrls.pas

?? Make your Delphi application UNICODE enabled.
?? PAS
?? 第 1 頁 / 共 5 頁
字號(hào):
        if Items.Count < FSaveItemIndex then FSaveItemIndex := Items.Count;
        SendMessage(Combo.Handle, CB_SETCURSEL, FSaveItemIndex, 0);
      end;
    end;
    TntControl_SetText(Combo, TntControl_GetStoredText(Combo, TAccessCustomComboBox(Combo).Text));
  end;
end;

procedure TntCombo_BeforeInherited_DestroyWnd(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  Items: TTntStrings; var FSaveItems: TTntStrings; ItemIndex: integer; var FSaveItemIndex: integer;
    var SavedText: WideString);
begin
  Assert(not (csDestroyingHandle in Combo.ControlState));
  if (Win32PlatformIsUnicode) then begin
    SavedText := TntControl_GetText(Combo);
    if (Items.Count > 0) then
    begin
      FSaveItems := TTntStringList.Create;
      FSaveItems.Assign(Items);
      FSaveItemIndex:= ItemIndex;
      Items.Clear; { This keeps TCustomComboBox from creating its own FSaveItems. (this kills the original ItemIndex) }
    end;
  end;
end;

function TntCombo_ComboWndProc(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  var Message: TMessage; ComboWnd: HWnd; ComboProc: Pointer; DoEditCharMsg: TWMCharMsgHandler): Boolean;

  procedure CallDefaultWindowProc;
  begin
    with Message do begin { call default wnd proc }
      if IsWindowUnicode(ComboWnd) then
        Result := CallWindowProcW(ComboProc, ComboWnd, Msg, WParam, LParam)
      else
        Result := CallWindowProcA(ComboProc, ComboWnd, Msg, WParam, LParam);
    end;
  end;

  function DoWideKeyPress(Message: TWMChar): Boolean;
  begin
    DoEditCharMsg(Message);
    Result := (Message.CharCode = 0);
  end;

begin
  Result := False;
  try
    if (Message.Msg = WM_CHAR) then begin
      // WM_CHAR
      Result := True;
      if IsWindowUnicode(ComboWnd) then
        MakeWMCharMsgSafeForAnsi(Message);
      try
        if TAccessCustomComboBox(Combo).DoKeyPress(TWMKey(Message)) then Exit;
        if DoWideKeyPress(TWMKey(Message)) then Exit;
      finally
        if IsWindowUnicode(ComboWnd) then
          RestoreWMCharMsg(Message);
      end;
      with TWMKey(Message) do begin
        if ((CharCode = VK_RETURN) or (CharCode = VK_ESCAPE)) and Combo.DroppedDown then begin
          Combo.DroppedDown := False;
          Exit;
        end;
      end;
      CallDefaultWindowProc;
    end else if (IsWindowUnicode(ComboWnd)) then begin
      // UNICODE
      if IsTextMessage(Message.Msg)
      or (Message.Msg = EM_REPLACESEL)
      or (Message.Msg = WM_IME_COMPOSITION)
      then begin
        // message w/ text parameter
        Result := True;
        CallDefaultWindowProc;
      end else if (Message.Msg = WM_IME_CHAR) then begin
        // WM_IME_CHAR
        Result := True;
        with Message do { convert to WM_CHAR }
          Result := SendMessageW(ComboWnd, WM_CHAR, WParam, LParam);
      end;
    end;
  except
    Application.HandleException(Combo);
  end;
end;

function TntCombo_CNCommand(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; Items: TTntStrings; var Message: TWMCommand): Boolean;
begin
  Result := False;
  if Message.NotifyCode = CBN_SELCHANGE then begin
    Result := True;
    TntControl_SetText(Combo, Items[Combo.ItemIndex]);
    TAccessCustomComboBox(Combo).Click;
    TAccessCustomComboBox(Combo).Select;
  end;
end;

function TntCombo_GetSelStart(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}): Integer;
begin
  if Win32PlatformIsUnicode then
    Result := Combo.SelStart
  else
    Result := Length(WideString(Copy(TAccessCustomComboBox(Combo).Text, 1, Combo.SelStart)));
end;

procedure TntCombo_SetSelStart(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; const Value: Integer);
begin
  if Win32PlatformIsUnicode then
    Combo.SelStart := Value
  else
    Combo.SelStart := Length(AnsiString(Copy(TntControl_GetText(Combo), 1, Value)));
end;

function TntCombo_GetSelLength(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}): Integer;
begin
  if Win32PlatformIsUnicode then
    Result := Combo.SelLength
  else
    Result := Length(TntCombo_GetSelText(Combo));
end;

procedure TntCombo_SetSelLength(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; const Value: Integer);
var
  StartPos: Integer;
begin
  if Win32PlatformIsUnicode then
    Combo.SelLength := Value
  else begin
    StartPos := TntCombo_GetSelStart(Combo);
    Combo.SelLength := Length(AnsiString(Copy(TntControl_GetText(Combo), StartPos + 1, Value)));
  end;
end;

function TntCombo_GetSelText(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}): WideString;
begin
  if Win32PlatformIsUnicode then begin
    Result := '';
    if TAccessCustomComboBox(Combo).Style < csDropDownList then
      Result := Copy(TntControl_GetText(Combo), Combo.SelStart + 1, Combo.SelLength);
  end else
    Result := Combo.SelText
end;

procedure TntCombo_SetSelText(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; const Value: WideString);
begin
  if Win32PlatformIsUnicode then begin
    if TAccessCustomComboBox(Combo).Style < csDropDownList then
    begin
      Combo.HandleNeeded;
      SendMessageW(TAccessCustomComboBox(Combo).EditHandle, EM_REPLACESEL, 0, Longint(PWideChar(Value)));
    end;
  end else
    Combo.SelText := Value
end;

procedure TntCombo_BeforeKeyPress(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; var SaveAutoComplete: Boolean);
begin
  SaveAutoComplete := TAccessCustomComboBox(Combo).AutoComplete;
  TAccessCustomComboBox(Combo).AutoComplete := False;
end;

procedure TntCombo_AfterKeyPress(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; var SaveAutoComplete: Boolean);
begin
  TAccessCustomComboBox(Combo).AutoComplete := SaveAutoComplete;
end;

procedure TntCombo_DropDown_PreserveSelection(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox});
var
  OldSelStart, OldSelLength: Integer;
  OldText: WideString;
begin
  OldText := TntControl_GetText(Combo);
  OldSelStart := TntCombo_GetSelStart(Combo);
  OldSelLength := TntCombo_GetSelLength(Combo);
  Combo.DroppedDown := True;
  TntControl_SetText(Combo, OldText);
  TntCombo_SetSelStart(Combo, OldSelStart);
  TntCombo_SetSelLength(Combo ,OldSelLength);
end;

procedure TntComboBox_AddItem(Items: TTntStrings; const Item: WideString; AObject: TObject);
begin
  Items.AddObject(Item, AObject);
end;

procedure TntComboBox_CopySelection(Items: TTntStrings; ItemIndex: Integer;
  Destination: TCustomListControl);
begin
  if ItemIndex <> -1 then
    WideListControl_AddItem(Destination, Items[ItemIndex], Items.Objects[ItemIndex]);
end;

function TntCombo_FindString(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  StartPos: Integer; const Text: WideString): Integer;
var
  ComboFindString: ITntComboFindString;
begin
  if Combo.GetInterface(ITntComboFindString, ComboFindString) then
    Result := ComboFindString.FindString(Text, StartPos)
  else if IsWindowUnicode(Combo.Handle) then
    Result := SendMessageW(Combo.Handle, CB_FINDSTRING, StartPos, Integer(PWideChar(Text)))
  else
    Result := SendMessageA(Combo.Handle, CB_FINDSTRING, StartPos, Integer(PAnsiChar(AnsiString(Text))))
end;

function TntCombo_FindUniqueString(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  StartPos: Integer; const Text: WideString): Integer;
var
  Match_1, Match_2: Integer;
begin
  Result := CB_ERR;
  Match_1 := TntCombo_FindString(Combo, -1, Text);
  if Match_1 <> CB_ERR then begin
    Match_2 := TntCombo_FindString(Combo, Match_1, Text);
    if Match_2 = Match_1 then
      Result := Match_1;
  end;
end;

function TntCombo_AutoSelect(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox}; Items: TTntStrings;
  const SearchText: WideString; UniqueMatchOnly: Boolean; UseDataEntryCase: Boolean): Boolean;
var
  Idx: Integer;
  ValueChange: Boolean;
begin
  if UniqueMatchOnly then
    Idx := TntCombo_FindUniqueString(Combo, -1, SearchText)
  else
    Idx := TntCombo_FindString(Combo, -1, SearchText);
  Result := (Idx <> CB_ERR);
  if Result then begin
    if TAccessCustomComboBox(Combo).Style = csDropDown then
      ValueChange := not WideSameStr(TntControl_GetText(Combo), Items[Idx])
    else
      ValueChange := Idx <> Combo.ItemIndex;
    {$IFDEF COMPILER_7_UP}
    // auto-closeup
    if Combo.AutoCloseUp and (Items.IndexOf(SearchText) <> -1) then
      Combo.DroppedDown := False;
    {$ENDIF}
    // select item
    Combo.ItemIndex := Idx;
    // update edit
    if (TAccessCustomComboBox(Combo).Style in [csDropDown, csSimple]) then begin
      if UseDataEntryCase then begin
        // preserve case of characters as they are entered
        TntControl_SetText(Combo, SearchText + Copy(Items[Combo.ItemIndex], Length(SearchText) + 1, MaxInt));
      end else begin
        TntControl_SetText(Combo, Items[Idx]);
      end;
      // select the rest of the string
      TntCombo_SetSelStart(Combo, Length(SearchText));
      TntCombo_SetSelLength(Combo, Length(TntControl_GetText(Combo)) - TntCombo_GetSelStart(Combo));
    end;
    // notify events
    if ValueChange then begin
      TAccessCustomComboBox(Combo).Click;
      TAccessCustomComboBox(Combo).Select;
    end;
  end;
end;

procedure TntCombo_AutoSearchKeyPress(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  Items: TTntStrings; var Message: TWMChar; var FFilter: WideString; var FLastTime: Cardinal);
var
  Key: WideChar;
begin
  if TAccessCustomComboBox(Combo).Style in [csSimple, csDropDown] then
    exit;
  if not Combo.AutoComplete then
    exit;
  Key := GetWideCharFromWMCharMsg(Message);
  try
    case Ord(Key) of
      VK_ESCAPE:
        exit;
      VK_TAB:
        if Combo.AutoDropDown and Combo.DroppedDown then
          Combo.DroppedDown := False;
      VK_BACK:
        Delete(FFilter, Length(FFilter), 1);
      else begin
        if Combo.AutoDropDown and (not Combo.DroppedDown) then
          Combo.DroppedDown := True;
        // reset FFilter if it's been too long (1.25 sec) { Windows XP is actually 2 seconds! }
        if GetTickCount - FLastTime >= 1250 then
          FFilter := '';
        FLastTime := GetTickCount;
        // if AutoSelect works, remember new FFilter
        if TntCombo_AutoSelect(Combo, Items, FFilter + Key, False, True) then begin
          FFilter := FFilter + Key;
          Key := #0;
        end;
      end;
    end;
  finally
    SetWideCharForWMCharMsg(Message, Key);
  end;
end;

procedure TntCombo_AutoCompleteKeyPress(Combo: TCustomComboBox{TNT-ALLOW TCustomComboBox};
  Items: TTntStrings; var Message: TWMChar;
    AutoComplete_UniqueMatchOnly, AutoComplete_PreserveDataEntryCase: Boolean);
var
  Key: WideChar;
  FindText: WideString;
begin
  Assert(TAccessCustomComboBox(Combo).Style in [csSimple, csDropDown], 'Internal Error: TntCombo_AutoCompleteKeyPress is only for csSimple and csDropDown style combo boxes.');
  if not Combo.AutoComplete then exit;
  Key := GetWideCharFromWMCharMsg(Message);
  try
    case Ord(Key) of
      VK_ESCAPE:
        exit;
      VK_TAB:
        if Combo.AutoDropDown and Combo.DroppedDown then
          Combo.DroppedDown := False;
      VK_BACK:
        exit;
      else begin
        if Combo.AutoDropDown and (not Combo.DroppedDown) then
          TntCombo_DropDown_PreserveSelection(Combo);
        // AutoComplete only if the selection is at the very end
        if ((TntCombo_GetSelStart(Combo) + TntCombo_GetSelLength(Combo))
            = Length(TntControl_GetText(Combo))) then
        begin
          FindText := Copy(TntControl_GetText(Combo), 1, TntCombo_GetSelStart(Combo)) + Key;
          if TntCombo_AutoSelect(Combo, Items, FindText, AutoComplete_UniqueMatchOnly, AutoComplete_PreserveDataEntryCase) then
          begin
            Key := #0;
          end;
        end;
      end;
    end;
  finally
    SetWideCharForWMCharMsg(Message, Key);
  end;
end;

//--
constructor TTntCustomComboBox.Create(AOwner: TComponent);
begin
  inherited;
  FItems := TTntComboBoxStrings.Create;
  TTntComboBoxStrings(FItems).ComboBox := Self;
end;

destructor TTntCustomComboBox.Destroy;
begin
  FreeAndNil(FItems);
  FreeAndNil(FSaveItems);
  inherited;
end;

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

procedure TTntCustomComboBox.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

procedure TTntCustomComboBox.CreateWnd;
var
  PreInheritedAnsiText: AnsiString;
begin
  PreInheritedAnsiText := TAccessCustomComboBox(Self).Text;
  inherited;
  TntCombo_AfterInherited_CreateWnd(Self, Items, FSaveItems, FSaveItemIndex, PreInheritedAnsiText);
end;

procedure TTntCustomComboBox.DestroyWnd;
var
  SavedText: WideString;
begin
  if not (csDestroyingHandle in ControlState) then begin { avoid recursion when parent is TToolBar and system font chang

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产美女精品一区二区三区| 成人动漫视频在线| 日韩二区在线观看| 轻轻草成人在线| 在线一区二区视频| 在线成人免费观看| 国产午夜精品在线观看| 国产精品国产三级国产三级人妇 | 国产精品一区二区久久不卡 | 午夜私人影院久久久久| 国产+成+人+亚洲欧洲自线| 高清不卡在线观看av| 欧美日韩一区二区在线观看| 精品国产一区二区三区久久久蜜月| 国产欧美视频一区二区| 亚洲va天堂va国产va久| 国产精选一区二区三区| 欧美日韩激情一区| 亚洲乱码日产精品bd| 国产剧情一区二区| 91精品国产综合久久久久久久久久| 国产女主播视频一区二区| 日韩电影网1区2区| 欧美视频日韩视频在线观看| 国产亚洲综合色| 国产乱子伦视频一区二区三区 | 免费人成网站在线观看欧美高清| 色域天天综合网| **网站欧美大片在线观看| 岛国精品在线播放| 国产精品视频一二三区| 国产不卡免费视频| 26uuu另类欧美亚洲曰本| 九一久久久久久| 亚洲精品一区二区三区四区高清 | 欧美人牲a欧美精品| 五月婷婷激情综合网| 国产精品成人一区二区艾草 | 国产欧美日韩一区二区三区在线观看| 成人午夜精品一区二区三区| 欧美一区二区三区喷汁尤物| 不卡的av在线播放| 亚洲综合一区在线| 在线播放91灌醉迷j高跟美女| 日本一不卡视频| 国产色产综合色产在线视频| bt欧美亚洲午夜电影天堂| 亚洲免费观看高清完整版在线 | 激情五月婷婷综合网| 久久久国产精华| 欧美三级乱人伦电影| 麻豆91在线播放| 亚洲欧美在线高清| 欧美一区二区在线视频| 国产精品亚洲人在线观看| √…a在线天堂一区| 欧美一区二区三区在线视频| 91精品在线免费| 高清国产一区二区| 日本vs亚洲vs韩国一区三区二区| 国产欧美一区二区精品仙草咪| 欧美四级电影网| 色综合av在线| 成人18精品视频| 国产ts人妖一区二区| 欧美aaaaaa午夜精品| 一区二区免费视频| 国产精品污网站| 精品国产百合女同互慰| 6080日韩午夜伦伦午夜伦| 日韩精品一区二区三区老鸭窝 | 亚洲成在线观看| 亚洲色图.com| 亚洲欧洲av色图| 亚洲欧洲日本在线| 中文字幕亚洲一区二区av在线| 精品国产精品网麻豆系列| 久久亚洲精精品中文字幕早川悠里| 欧美精品日韩一区| 日韩免费看网站| 欧美成人免费网站| 精品久久一二三区| 久久久99久久精品欧美| 中文字幕欧美激情一区| 国产精品久久夜| 亚洲一区二区三区四区中文字幕| 亚洲综合久久av| 天天综合色天天| 国产精品99久久久久久似苏梦涵 | 国产伦精一区二区三区| 国产v日产∨综合v精品视频| bt7086福利一区国产| 欧美一区永久视频免费观看| 亚洲丝袜自拍清纯另类| 无码av中文一区二区三区桃花岛| 狠狠色丁香久久婷婷综合丁香| 东方aⅴ免费观看久久av| 91网站最新地址| 精品久久久影院| 国产精品美女久久久久久久网站| 亚洲va在线va天堂| 成人福利视频网站| 91麻豆精品国产91久久久久久| 欧美国产精品一区| 日本在线观看不卡视频| aaa国产一区| 精品久久久网站| 日精品一区二区| 91毛片在线观看| 国产女同互慰高潮91漫画| 久久99精品一区二区三区三区| 91论坛在线播放| 亚洲国产激情av| 国产一区二区三区在线看麻豆| 欧美理论在线播放| 亚洲国产日产av| 欧美专区日韩专区| 亚洲成人av电影| 欧美色爱综合网| 首页综合国产亚洲丝袜| 一本久道久久综合中文字幕| 亚洲国产精品av| 成人黄色免费短视频| 国产蜜臀av在线一区二区三区| 国产精一区二区三区| 国产日韩精品久久久| 福利一区福利二区| 亚洲三级免费观看| 在线免费亚洲电影| 手机精品视频在线观看| 日韩欧美在线网站| 国产精品99精品久久免费| 国产精品久久久久久亚洲毛片| 成人美女视频在线看| 亚洲视频电影在线| 欧美日韩国产中文| 国产成人在线影院| 亚洲精品视频在线| 欧美一级夜夜爽| 国产99一区视频免费| 一区二区三区精品视频| 91精品国产乱| 92精品国产成人观看免费| 亚洲综合激情网| 久久久不卡网国产精品二区| 99久久99久久精品免费观看| 香蕉成人啪国产精品视频综合网| 精品国产三级电影在线观看| 色综合色综合色综合| 精品一区二区三区久久久| 玉足女爽爽91| 国产精品久久久一区麻豆最新章节| 欧美日韩视频第一区| 国产高清视频一区| 麻豆91精品91久久久的内涵| 亚洲码国产岛国毛片在线| 精品国产一区二区精华| 欧美人与z0zoxxxx视频| 在线视频亚洲一区| 91免费视频观看| 99精品国产视频| 99精品久久只有精品| 国产a精品视频| 国产成人a级片| 大白屁股一区二区视频| 激情久久久久久久久久久久久久久久| 午夜亚洲福利老司机| 亚洲在线视频一区| 亚洲一区二区三区四区五区黄| 中文字幕日韩精品一区| 国产欧美一区二区精品性| 欧美精品一区二区三区四区| 欧美另类变人与禽xxxxx| 91精品国产综合久久精品麻豆| 欧美视频日韩视频| 欧美一区二区性放荡片| 久久综合中文字幕| 中文字幕视频一区| 亚洲一区二区三区在线看 | 在线视频一区二区三区| 91精品国产一区二区三区| 日韩欧美一卡二卡| 国产女人水真多18毛片18精品视频| 欧美国产精品久久| 亚洲第一久久影院| 国产精品 欧美精品| 91精品办公室少妇高潮对白| 91麻豆精品国产91久久久使用方法 | 国产乱码精品1区2区3区| 色噜噜狠狠色综合欧洲selulu| 欧美三级日本三级少妇99| 欧美精品一区二区三区在线播放| 国产精品成人免费在线| 性欧美疯狂xxxxbbbb| 国产不卡视频在线观看| 91 com成人网| 亚洲一区二区黄色| 成人午夜精品在线| 欧美精品一区二区三区蜜桃视频| 日韩理论片一区二区|