// KeyHook.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "KeyHook.h"
#include "MainFrm.h"
#include "KeyHookDoc.h"
#include "KeyHookView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CKeyHookApp
BEGIN_MESSAGE_MAP(CKeyHookApp, CWinApp)
//{{AFX_MSG_MAP(CKeyHookApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CKeyHookApp construction
CKeyHookApp::CKeyHookApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CKeyHookApp object
CKeyHookApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CKeyHookApp initialization
BOOL CKeyHookApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CKeyHookDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CKeyHookView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_HIDE);
m_pMainWnd->UpdateWindow();
return TRUE;
}
KeyHook(键盘钩子)
需积分: 12 74 浏览量
2008-11-20
18:14:51
上传
评论 1
收藏 1.6MB RAR 举报
renguiju
- 粉丝: 1
- 资源: 1
最新资源
- 基于jsp+mysql的JSP九宫格日记本源码.zip
- 基于jsp+mysql的JSP会员卡积分管理系统源码.zip
- 仿小米商城微信小程序源码+项目说明.zip
- 基于jsp+mysql的JSP个人日记本源码.zip
- 南溪CN No1 fps网络断网工具.zip
- 基于jsp+mysql的JSP宠物商城源码.zip
- C++开发基于Qt的音乐播放器的设计与实现项目源码+项目使用说明(毕业设计).zip
- 基于jsp+mysql+servlet的JSP图书馆图书管理系统源码.zip
- C++开发基于Qt的音乐播放器的设计与实现项目源码+项目使用说明(毕业设计).zip
- 【2024win11软件启动速度反应慢解决方法附工具】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈