Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

OutputView.cpp

00001 /* QuestDesigner - Open Zelda's Project
00002    Copyright (C) 2003 Kronuz
00003    Copyright (C) 2001/2003 Open Zelda's Project
00004  
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 */
00019 
00021 // OutputView.cpp : implementation of the COutputView class
00022 //
00023 
00024 #include "stdafx.h"
00025 
00026 #include "OutputView.h"
00027 
00028 LRESULT COutputView::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
00029 {
00030   PARAFORMAT2 pf;
00031   pf.cbSize = sizeof(pf);
00032   pf.dwMask = PFM_ALL2;
00033   GetParaFormat(pf);
00034   pf.dwMask = PFM_OFFSET;
00035   pf.dxOffset = 200;
00036   SetParaFormat(pf);
00037 
00038   SetAutoURLDetect(TRUE);
00039   SetEventMask(ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_SELCHANGE | ENM_LINK | ENM_SCROLL | ENM_SCROLLEVENTS);
00040   //SetBackgroundColor(0xE9F2F7);
00041   bHandled = FALSE;
00042 
00043   return 0;
00044 }
00045 BOOL COutputView::PreTranslateMessage(MSG* pMsg)
00046 {
00047     pMsg;
00048     return FALSE;
00049 }
00050 
00051 void COutputView::WriteMsg(LPCTSTR lpszNewText, CHARFORMAT2 *pcFmt)
00052 {
00053     SetRedraw(FALSE);
00054     SetSel(-1,-1);
00055     SetSelectionCharFormat(*pcFmt);  
00056     ReplaceSel(lpszNewText);
00057     SendMessage(WM_VSCROLL, SB_BOTTOM, NULL);
00058     SetSel(-1,-1); // deselect and move to end
00059     SetRedraw(TRUE);
00060     RedrawWindow();
00061 }

Generated on Wed Apr 16 19:12:22 2003 for QuestDesigner by doxygen1.2.18