www.pudn.com > TidyWin32-src.zip > OutputView.h


#ifndef OUTPUT_VIEW_H 
#define OUTPUT_VIEW_H 
 
#include "resource.h" 
 
class CTidyProxy; 
 
//------------------------------------------------------------------- 
class COutputView : public CDialogImpl 
{ 
public: 
	enum { IDD = IDD_OUTPUT_VIEW }; 
	COutputView(CTidyProxy*); 
 
	BOOL IsDialogMsg(LPMSG lpMsg); 
	void SetText(const char*); 
 
private: 
	CTidyProxy* m_pTidyProxy; 
	ATLControls::CRichEditCtrl m_OutputEdit; 
	SIZE m_EditTopLeftMargins, m_EditBottomRightMargins; 
	LOGFONT m_logFont; 
 
private: 
	static DWORD __stdcall RichEditOutputCallback(DWORD dwCookie, LPBYTE pbBuff, 
		LONG cb, LONG *pcb); 
public: 
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
	LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
 
	LRESULT OnSaveAs(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnFont(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnToggleReadOnly(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
 
	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
 
BEGIN_MSG_MAP(COutputView) 
	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 
	COMMAND_ID_HANDLER(IDCANCEL, OnCancel) 
	COMMAND_ID_HANDLER(IDC_OUTPUT_SAVEAS, OnSaveAs) 
	COMMAND_ID_HANDLER(IDC_OUTPUT_FONT_BUTTON, OnFont) 
	COMMAND_ID_HANDLER(IDC_OUTPUT_READ_ONLY, OnToggleReadOnly) 
	MESSAGE_HANDLER(WM_SIZE, OnSize) 
END_MSG_MAP() 
}; 
 
//------------------------------------------------------------------- 
#endif	// OUTPUT_VIEW_H