diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-15 13:57:58 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-15 13:57:58 +0000 |
commit | 45f2d9d180079ee36b273cda4d60a623b4ad5251 (patch) | |
tree | 0e7b510994e1c89190258854f8bd35866b6e5d0b /cppe/demo/IceE/chat/ChatClientDlg.cpp | |
parent | demo builds are now sensitive to build targets (diff) | |
download | ice-45f2d9d180079ee36b273cda4d60a623b4ad5251.tar.bz2 ice-45f2d9d180079ee36b273cda4d60a623b4ad5251.tar.xz ice-45f2d9d180079ee36b273cda4d60a623b4ad5251.zip |
Fixes for WinCE
Diffstat (limited to 'cppe/demo/IceE/chat/ChatClientDlg.cpp')
-rw-r--r-- | cppe/demo/IceE/chat/ChatClientDlg.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cppe/demo/IceE/chat/ChatClientDlg.cpp b/cppe/demo/IceE/chat/ChatClientDlg.cpp index b3e8b249be3..e31b0b063b9 100644 --- a/cppe/demo/IceE/chat/ChatClientDlg.cpp +++ b/cppe/demo/IceE/chat/ChatClientDlg.cpp @@ -153,7 +153,13 @@ CChatClientDlg::OnSend() try { +#ifdef _WIN32_WCE + char buffer[256]; + wcstombs(buffer, text, 256); + _chat->say(buffer); +#else _chat->say(std::string(text)); +#endif } catch(const Ice::ConnectionLostException&) { @@ -162,7 +168,11 @@ CChatClientDlg::OnSend() _edit->EnableWindow(FALSE); ((CButton*)GetDlgItem(IDC_SEND))->EnableWindow(FALSE); (CEdit*)GetDlgItem(IDC_LOG2)->EnableWindow(FALSE); +#ifdef _WIN32_WCE + ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText(L"Login"); +#else ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText("Login"); +#endif return; } @@ -199,14 +209,22 @@ CChatClientDlg::OnLogin() _edit->EnableWindow(FALSE); ((CButton*)GetDlgItem(IDC_SEND))->EnableWindow(FALSE); (CEdit*)GetDlgItem(IDC_LOG2)->EnableWindow(FALSE); +#ifdef _WIN32_WCE + ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText(L"Login"); +#else ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText("Login"); +#endif } else { _edit->EnableWindow(TRUE); ((CButton*)GetDlgItem(IDC_SEND))->EnableWindow(TRUE); (CEdit*)GetDlgItem(IDC_LOG2)->EnableWindow(TRUE); +#ifdef _WIN32_WCE + ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText(L"Logout"); +#else ((CButton*)GetDlgItem(IDC_CONFIG))->SetWindowText("Logout"); +#endif ((CEdit*)GetDlgItem(IDC_LOG))->SetFocus(); } }
|