char ch; for(int i=0;i<m_Message.GetLength();i++) { ch=m_Message.GetAt(i); ::PostMessage(hwndSelected,WM_CHAR,ch&0x00FF,1); Sleep(20); }