Exemple #1
0
BOOL MainWindow::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	if(0==wParam){
		GetDlgItem(0)->ShowWindow(SW_HIDE);
		GetDlgItem(1)->ShowWindow(SW_SHOW);
		GoToBottom();
	}
	else if(1==wParam){
		GetDlgItem(0)->ShowWindow(SW_SHOW);
		GetDlgItem(1)->ShowWindow(SW_HIDE);
		GoToTop();
	}
	return CWnd::OnCommand(wParam, lParam);
}
Exemple #2
0
	void OutputWindow::ProcessQueue()
	{
		_forceQueue = false;
		if (_queue.empty()) return;

		int oldStyle = _style;

		for (OutputItemList::iterator i = _queue.begin(), ii = _queue.end(); i != ii; ++i)
		{
			_style = i->style;

			switch (i->action)
			{
			case OUTPUTITEM_WRITE:
				_style = i->style;
				Write(i->text.c_str());
				break;

			case OUTPUTITEM_WRITELINE:
				_style = i->style;
				WriteLine(i->text.c_str());
				break;

			case OUTPUTITEM_GOTOTOP:
				GoToTop();
				break;

			case OUTPUTITEM_GOTOBOTTOM:
				GoToBottom();
				break;
			}
		}

		_style = oldStyle;
		_queue.clear();
	}