|
#if !defined(AFX_CMDEDIT_H__8ED74B38_62CF_4629_95A8_2FE88E4F6521__INCLUDED_)
#define AFX_CMDEDIT_H__8ED74B38_62CF_4629_95A8_2FE88E4F6521__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CmdEdit.h : header file
//
#include "spawn.h"
class CCmdEdit;
class CSpawnConsumer1;
/////////////////////////////////////////////////////////////////////////////
// CCmdEdit window
class CCmdEdit : public CEdit
{
// Construction
public:
CCmdEdit();
// Attributes
public:
// Operations
public:
void Append(LPCTSTR szText);
void AppendRaw(LPCTSTR szText);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCmdEdit)
protected:
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCmdEdit();
// Generated message map functions
protected:
//{{AFX_MSG(CCmdEdit)
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg UINT OnGetDlgCode();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
CString m_strCmd;
CSpawn m_Spawn;
CSpawnConsumer1* m_pConsumer;
};
class CSpawnConsumer1 : public CSpawnConsumer
{
public:
CSpawnConsumer1(CCmdEdit* pEdit) {m_pEdit = pEdit;}
void Consume(TCHAR* p, DWORD)
{
m_pEdit->AppendRaw(p);
}
private:
CCmdEdit* m_pEdit;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CMDEDIT_H__8ED74B38_62CF_4629_95A8_2FE88E4F6521__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Software Smith, Blacksmith, Repeat Founder, Austrian, Asgardian.