1. 최초 커밋
This commit is contained in:
47
KeyHookForCapture/HookProcedure.cpp
Normal file
47
KeyHookForCapture/HookProcedure.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "stdafx.h"
|
||||
#include "HookProcedure.h"
|
||||
|
||||
|
||||
extern HHOOK g_hHook;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char szPath[MAX_PATH] = {0,};
|
||||
char *p = NULL;
|
||||
|
||||
//------------------------------
|
||||
//
|
||||
//------------------------------
|
||||
TCHAR szCaptureWindowName[] = "MFC_PIDINFO_Training";
|
||||
|
||||
HWND hWindowToFind = NULL;
|
||||
HWND hCurrTopWindowHandle = NULL;
|
||||
|
||||
TCHAR szMessage[ 128 ] = { 0, };
|
||||
|
||||
if( ( wParam == VK_F12 ) && !( lParam & FLAG_KEYDOWN ) )
|
||||
{
|
||||
hWindowToFind = FindWindow( NULL, szCaptureWindowName );
|
||||
|
||||
if( hWindowToFind != NULL )
|
||||
{
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
SendMessage( hWindowToFind, WM_USER + 10000, (WPARAM)0, (LPARAM)0 );
|
||||
|
||||
#if defined( _DEBUG_MODE_ )
|
||||
MessageBox( NULL, "Send Message","", MB_OK );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined( _DEBUG_MODE_ )
|
||||
MessageBox( NULL, "No Found!","", MB_OK );
|
||||
#endif //
|
||||
}
|
||||
}
|
||||
return CallNextHookEx(g_hHook, nCode, wParam, lParam);
|
||||
}
|
Reference in New Issue
Block a user