void CHideDlgDlg::OnButton10() { // TODO: Add your control notification handler code here CWnd * pWnd = GetDlgItem(IDC_TREE1); if (pWnd){ pWnd->SetFocus(); HIMC hIMC = ImmGetContext(pWnd->m_hWnd); DWORD dwConv, dwSent; DWORD dwTemp; ImmGetConversionStatus(hIMC,&dwConv,&dwSent); if (dwConv & IME_CMODE_SOFTKBD) dwConv &= ~IME_CMODE_SOFTKBD; else dwConv |= IME_CMODE_SOFTKBD; ImmSetConversionStatus(hIMC,dwConv,dwSent); ImmReleaseContext(pWnd->m_hWnd,hIMC); } }