50 lines
944 B
C++
50 lines
944 B
C++
|
|
#include "SGameConsole.h"
|
|
|
|
|
|
|
|
SGameConsole::SGameConsole()
|
|
{
|
|
m_bExistCommand = FALSE;
|
|
memset( m_szCommand, 0, sizeof(m_szCommand) );
|
|
}
|
|
|
|
SGameConsole::~SGameConsole()
|
|
{
|
|
|
|
}
|
|
|
|
void SGameConsole::ReSet()
|
|
{
|
|
m_bExistCommand = FALSE;
|
|
memset( m_szCommand, 0, sizeof(m_szCommand) );
|
|
}
|
|
|
|
const char * SGameConsole::GetCommand()
|
|
{
|
|
return m_szCommand;
|
|
}
|
|
|
|
LRESULT CALLBACK SGameConsole::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
{
|
|
switch (message)
|
|
{
|
|
case WM_COMMAND: //Console Edit 에서 String 가져 온다.
|
|
{
|
|
// if( lParam != (LPARAM)hEdit ) break;
|
|
// if( HIWORD( wParam ) != EN_UPDATE ) break;
|
|
// GetWindowText( hEdit, m_szCommand, sizeof(m_szCommand) );
|
|
// m_szCommand[sizeof(m_szCommand)-1] = 0;
|
|
|
|
//char *p;
|
|
//if( p = strstr( m_szCommand, "\r\n" ) )
|
|
//{
|
|
// SetWindowText( hEdit, "" );
|
|
// m_bExistCommand = TRUE;
|
|
//}
|
|
}
|
|
break;
|
|
}
|
|
|
|
return 0;
|
|
} |