LRESULT PreviewLogDlg::onReceiveLogItem(UINT /*wNotifyCode*/, WPARAM wID, LPARAM /*hWndCtl*/, BOOL& /*bHandled*/) { CListBox mBox; mBox.Attach(GetDlgItem(IDC_PRV_DLG_LOG_LST)); string outString; if (VideoPreview::getInstance()->GetNextLogItem(outString)) mBox.AddString(Text::toT(outString).c_str()); mBox.SetTopIndex(mBox.GetCount() - 1); mBox.Detach(); UpdateItems(); // Make Scroll return 0; }