Example #1
0
LRESULT PreviewLogDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	GetDlgItem(IDC_PRV_DLG_SERVER_GROUP).SetWindowText(CTSTRING(PRV_DLG_SERVER_GROUP));
	GetDlgItem(IDC_PRV_DLG_SERVER_STATE_STATIC).SetWindowText(CTSTRING(PRV_DLG_SERVER_STATE_STATIC));
	
	
	GetDlgItem(IDC_PRV_DLG_VIDEO_NAME_STATIC).SetWindowText(CTSTRING(PRV_DLG_VIDEO_NAME_STATIC));
	GetDlgItem(IDC_PRV_DLG_LOG_GROUP).SetWindowText(CTSTRING(PRV_DLG_LOG_GROUP));
	
	CenterWindow(GetParent());
	GetDlgItem(IDCANCEL).SetWindowText(CTSTRING(CLOSE));
	
	SetWindowText(CTSTRING(PREVIEW_LOG_DLG));
	
	UpdateItems();
	
	// Fill IDC_PRV_DLG_LOG_LST
	
	CListBox mBox;
	mBox.Attach(GetDlgItem(IDC_PRV_DLG_LOG_LST));
	string outString;
	while (VideoPreview::getInstance()->GetNextLogItem(outString))
		mBox.AddString(Text::toT(outString).c_str());
	mBox.Detach();
	
	VideoPreview::getInstance()->SetLogDlgWnd(*this);
	
	return FALSE;
}
Example #2
0
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;
}