CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Conversion of Kanji characters to Furigana while editing in a control

    I'm presently working on the Japanese version of VB 6.0. I'm faced with a problem of converting Kanji characters to Furigana. As I type Kanji characters in one text box, I need to get it converted to corresponding Furigana representation simultaneously. Any suggestions ?



  2. #2
    Join Date
    Apr 1999
    Location
    CA, USA
    Posts
    78

    Re: Conversion of Kanji characters to Furigana while editing in a control

    I don't know about the conversion from Kanji to Furigana. But, I can give you some help about updating the editboxes. For example, you have two editctrl (edit1 for Kanji and edit2 for Furigana). Use ClassWizard to create a EN_CHANGE message handler for edit1, then do the character conversion and updating in the function.

    void CTestDlg::OnChangeEdit1()
    {
    // TODO: If this is a RICHEDIT control, the control will not
    // send this notification unless you override the CDialog::OnInitDialog()
    // function to send the EM_SETEVENTMASK message to the control
    // with the ENM_CHANGE flag ORed into the lParam mask.

    // TODO: Add your control notification handler code here
    CString kanji=_T(""), furigana=_T("");

    m_edit1.GetWindowText(kanji); // get typed Kanji from edit1
    furigana = ConvertKanji2Furigana(kanji); // convert Kanji string to Furigana

    m_edit2.SetWindowText(furigana); // update Furigana in edit2
    }


    Hope this is what you want. Good luck.

    Lynx.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured