diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-08 02:45:11 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-08 02:45:11 +0000 |
commit | 475d10e3bded459e33bcd71d40286ac381571469 (patch) | |
tree | 0b6c549b954de6ba122abfc2a11bbd0400a74b42 /cpp/demo/Ice/MFC/server/HelloServerDlg.cpp | |
parent | clean up MFC demo. Fix bug with the status bar. (diff) | |
download | ice-475d10e3bded459e33bcd71d40286ac381571469.tar.bz2 ice-475d10e3bded459e33bcd71d40286ac381571469.tar.xz ice-475d10e3bded459e33bcd71d40286ac381571469.zip |
Fixed bug with Log implementation.
Diffstat (limited to 'cpp/demo/Ice/MFC/server/HelloServerDlg.cpp')
-rw-r--r-- | cpp/demo/Ice/MFC/server/HelloServerDlg.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/demo/Ice/MFC/server/HelloServerDlg.cpp b/cpp/demo/Ice/MFC/server/HelloServerDlg.cpp index 8c54424f2e2..3cb62fde017 100644 --- a/cpp/demo/Ice/MFC/server/HelloServerDlg.cpp +++ b/cpp/demo/Ice/MFC/server/HelloServerDlg.cpp @@ -35,6 +35,7 @@ BEGIN_MESSAGE_MAP(CHelloServerDlg, CDialog) //}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_SHUTDOWN, OnShutdown)
ON_BN_CLICKED(IDC_CLEAR, OnClear)
+ ON_MESSAGE(WM_USER, OnLog) END_MESSAGE_MAP()
BOOL
@@ -51,7 +52,7 @@ CHelloServerDlg::OnInitDialog() // Retrieve the edit control.
//
_edit = (CEdit*)GetDlgItem(IDC_LOG);
- _log->setControl(_edit);
+ _log->setHandle(m_hWnd);
//
// Set the focus to the shutdown button, so that the text in the log
@@ -65,7 +66,7 @@ CHelloServerDlg::OnInitDialog() void
CHelloServerDlg::OnCancel()
{
- _log->setControl(0);
+ _log->setHandle(0);
CDialog::OnCancel();
}
@@ -118,3 +119,16 @@ CHelloServerDlg::OnClear() {
_edit->SetWindowText(CString(""));
}
+ +LRESULT +CHelloServerDlg::OnLog(UINT wParam, UINT lParam) +{ + char* text = (char*)lParam; + + _edit->SetSel(-1, -1); + _edit->ReplaceSel(CString(text)); + + delete[] text; + + return 0; +} |