trichview.com

trichview.support




How to control  the input method editor (IME)


Return to index


Author

Message

bagio

Posted: 08/12/2003 14:01:55


In a RichViewEdit ,I have change IME to Chinese ,but when I use fontnamecombobox

change a new font,the current IME changes to English.

Why?

Code:

void __fastcall TFrameEdit::RichViewEditStyleConversion(

      TCustomRichViewEdit *Sender, int StyleNo, int UserData,

      bool AppliedToText, int &NewStyleNo)

{

  TFontInfo* FontInfo = new TFontInfo(NULL);

  FontInfo->Assign(RVStyle->TextStyles->Items[StyleNo]);

  switch (UserData)

  {

    case DEMO_APPLYFONTNAME:

      FontInfo->FontName = FrmMain->cmbFont->Items->Strings[FrmMain->cmbFont->ItemIndex];

      break;

}

  NewStyleNo = RVStyle->TextStyles->FindSuchStyle(StyleNo,FontInfo,RVAllFontInfoProperties);

  if (NewStyleNo<0)

  {

    RVStyle->TextStyles->Add();

    NewStyleNo = RVStyle->TextStyles->Count-1;

    RVStyle->TextStyles->Items[NewStyleNo]->Assign(FontInfo);

    RVStyle->TextStyles->Items[NewStyleNo]->Standard = false;

  }

  delete FontInfo;





Powered by ABC Amber Outlook Express Converter