Click to See Complete Forum and Search --> : Conversion of Kanji characters to Furigana while editing in a control


April 17th, 1999, 03:54 AM
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 ?

Lynx
April 17th, 1999, 04:15 AM
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.