Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
97
Server/NFAuthTool/NFAuthServer/NaveServer/UICmdEdit.cpp
Normal file
97
Server/NFAuthTool/NFAuthServer/NaveServer/UICmdEdit.cpp
Normal file
@@ -0,0 +1,97 @@
|
||||
#include "Global.h"
|
||||
#include "UICmdEdit.h"
|
||||
#include "UICmdMsgView.h"
|
||||
|
||||
namespace NaveServer {
|
||||
|
||||
HWND UICmdEdit::s_hEditWnd = NULL; // <20><><EFBFBD><EFBFBD>Ʈ,
|
||||
CHAR UICmdEdit::s_EditStr[MAX_EDITSTRING];
|
||||
WNDPROC UICmdEdit::s_OldEditProc;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
LRESULT UICmdEdit::OnEditDefault( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
return CallWindowProc( s_OldEditProc, hWnd, uMsg, wParam, lParam );
|
||||
}
|
||||
|
||||
LRESULT UICmdEdit::OnEditKeyDown( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( wParam )
|
||||
{
|
||||
case VK_TAB:
|
||||
// ListView<65><77> <20><>Ŀ<EFBFBD><C4BF> <20>ѱ<EFBFBD>
|
||||
SetFocus(UICmdMsgView::s_hListWnd);
|
||||
return FALSE;
|
||||
}
|
||||
return OnEditDefault(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT UICmdEdit::OnEditChar( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( wParam )
|
||||
{
|
||||
case 13: // EditBox<6F><78><EFBFBD><EFBFBD> return<72><6E> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
SendMessage( hWnd, WM_GETTEXT, MAX_EDITSTRING, (LPARAM)(LPSTR )s_EditStr);
|
||||
if(strlen(s_EditStr) == 0)
|
||||
break;
|
||||
// <20>Է<EFBFBD><D4B7>ѰͿ<D1B0> <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
SendMessage( hWnd, EM_SETSEL, 0, (LPARAM )-1 );
|
||||
// <20>θ<CEB8> Return<72><6E> <20><><EFBFBD><EFBFBD>
|
||||
SendMessage( GetParent(hWnd), WM_EDIT_RETURN, strlen(s_EditStr), (LPARAM)(LPSTR )s_EditStr );
|
||||
return FALSE;
|
||||
}
|
||||
return OnEditDefault(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK UICmdEdit::EditProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( uMsg )
|
||||
{
|
||||
case WM_KEYDOWN:
|
||||
return OnEditKeyDown( hWnd, uMsg, wParam, lParam );
|
||||
case WM_CHAR :
|
||||
return OnEditChar( hWnd, uMsg, wParam, lParam );
|
||||
default :
|
||||
return OnEditDefault( hWnd, uMsg, wParam, lParam );
|
||||
}
|
||||
}
|
||||
|
||||
HWND UICmdEdit::InitEditProc( HWND hParent, HFONT hFont )
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.. ó<><C3B3>
|
||||
ZeroMemory(s_EditStr, sizeof(s_EditStr));
|
||||
|
||||
RECT rect;
|
||||
GetClientRect( hParent, &rect );
|
||||
|
||||
s_hEditWnd = CreateWindowW( L"EDIT", L"",
|
||||
WS_CHILD | WS_CLIPSIBLINGS | WS_TABSTOP | WS_VISIBLE | WS_BORDER | ES_WANTRETURN | ES_AUTOHSCROLL,
|
||||
0, rect.bottom-EDIT_HEIGHT, rect.right, EDIT_HEIGHT,
|
||||
hParent, (HMENU )ID_EDIT,
|
||||
(HINSTANCE )GetWindowLong( hParent, GWL_HINSTANCE ), NULL );
|
||||
|
||||
ShowWindow( s_hEditWnd, SW_SHOW );
|
||||
UpdateWindow( s_hEditWnd );
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
::SendMessage(s_hEditWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(FALSE,0));
|
||||
|
||||
// <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD>Ʈ <20>ڽ<EFBFBD><DABD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
|
||||
s_OldEditProc = (WNDPROC )GetWindowLong( s_hEditWnd, GWL_WNDPROC );
|
||||
SetWindowLong( s_hEditWnd, GWL_WNDPROC, (LONG )EditProc );
|
||||
|
||||
return s_hEditWnd;
|
||||
}
|
||||
|
||||
VOID UICmdEdit::ResizeEdit( HWND hParent )
|
||||
{
|
||||
RECT r;
|
||||
GetClientRect( hParent, &r );
|
||||
|
||||
MoveWindow( s_hEditWnd, 0, r.bottom-EDIT_HEIGHT, r.right, EDIT_HEIGHT, TRUE );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user