掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
IMEの変換中、KeyUpイベントをスルーするには? (ID:43160)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
"けど"さん、ありがとうございます。 ただ、その辺りは、いろいろと調べつくしました。 とりあえず、VCLで IME変換中は赤色にするって感じでやったところOKっぽいですが、 FMXで実現するのは、どうすればいいのか皆目見当が付きません。 private WndMethod1:TWndMethod; WndMethod2:TWndMethod; procedure WindowProc1(var Msg:TMessage); procedure WindowProc2(var Msg:TMessage); var flg: Boolean; procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); begin if flg then begin Edit1.Color := clRed; end else begin Edit1.Color := clWindow; end; end; procedure TForm1.FormCreate(Sender: TObject); begin WndMethod1 := Edit1.WindowProc; Edit1.WindowProc := WindowProc1; WndMethod2 := Edit2.WindowProc; Edit2.WindowProc := WindowProc2; end; procedure TForm1.WindowProc1(var Msg: TMessage); begin case Msg.Msg of WM_IME_ENDCOMPOSITION:begin flg := False; end; WM_IME_COMPOSITION:begin flg := True; end; end; WndMethod1(Msg); end; procedure TForm1.WindowProc2(var Msg: TMessage); begin case Msg.Msg of WM_IME_ENDCOMPOSITION:begin flg := False; end; WM_IME_COMPOSITION:begin flg := True; end; end; WndMethod2(Msg); end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.