Esempio n. 1
0
int DBObjData::Write (FILE *file)

	{
	RecalcExtent ();
	if (DBDataHeader::Write (file) == DBFault) return (DBFault);
	return (_Write (file));
	}
Esempio n. 2
0
void CMFCConsoleView::OutputMessage(const char* pcMessage)
{
	if (pOutputList_ == 0) {
		// We don't have a pointer to the list control yet, so get one
		HWND hList = ::GetDlgItem(m_hWnd, LIST_MAIN);
		if (hList) {
			pOutputList_ = new CListBox();
			pOutputList_->Attach(hList);
		}
		else {
			MessageBox("Bad joss, Taipan!\n\n"
					"Murphy has inflicted the console with impotence!",
					"MFC Console");
		}
	}

	if (pOutputList_) {
		// List control exists, so output the message and scroll it into
		// view.  Also, recalculate the width of the list and repaint.
		pOutputList_->AddString(pcMessage);
		pOutputList_->SetCurSel(pOutputList_->GetCount() - 1);
		RecalcExtent();
		pOutputList_->Invalidate(FALSE);
		pOutputList_->UpdateWindow();
	}
}