kExWH_KEYBOARDHOOKPROCKeyboardProchins0 ifhHookNULL nHookCount return hHookNULL BOOL UnInit BOOL unhooked UnhookWindowsHookExhHook ifunhookedTRUE return unhooked BOOL __declspecdllexport __stdcall AddHotkeyHWND hWndUCHAR cKeyUCHAR cMask return bAdded BOOL __declspecdllexport __stdcall DeleteHotkeyHWND hWndUCHAR cKeyUCHAR cMask return bRemoved void VerifyWindow BOOL CHookApp::InitInstance int CHookApp::ExitInstance ////////////////////////////////////////////////////////////////////// CaptureDlg.h : header file if definedAFX_CAPTUREDLG_H__97B51708_C928_11D5_B7D6_0080C82BE86B__INCLUDED_ define AFX_CAPTUREDLG_H__97B51708_C928_11D5_B7D6_0080C82BE86B__INCLUDED_ if _MSC_VER gt 1000 pragma once endif // _MSC_VER gt 1000 class CCaptureDlg : public CDialog C ComboBox m_Key BOOL m_bControl BOOL m_bAlt BOOL m_bShift CString m_Path CString m_Number //AFX_DATA // ClassWizard generated virtual function overrides //AFX_VIRTUAL // Implementation protected: HICON m_hIcon // Generated message map functions //AFX_MSG DECLARE_MESSAGE_MAP endif ////////////////////// CaptureDlg.cpp : implementation file include quotstdafx.hquot include quotCapture.hquot include quotCaptureDlg.hquot include ltwindowsx.hgt pragma commentlibquothook.libquot ifdef _DEBUG define new DEBUG_NEW undef THIS_FILE static char THIS_FILE __FILE__ endif define IDM_SHELL WM_USER1 BOOL __declspecdllexport__stdcall AddHotkeyHWNDUCHAR keyUCHAR mask BOOL __declspecdllexport__stdcall DeleteHotkeyHWNDUCHAR keyUCHAR mask UCHAR Key_Table class CAboutDlg : public CDialog //AFX_DATA // ClassWizard generated virtual function overrides //AFX_VIRTUAL // Implementation protected: //AFX_MSG DECLARE_MESSAGE_MAP CAboutDlg::CAboutDlg : CDialogCAboutDlg::IDD AFX_DATA_INIT void CAboutDlg::DoDataExchangeCDataExchange pDX AFX_DATA_MAP BEGIN_MESSAGE_MAPCAboutDlg CDialog //AFX_MSG_MAP END_MESSAGE_MAP CCaptureDlg::CCaptureDlgCWnd pParent /NULL/ : CDialogCCaptureDlg::IDD pParent AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon AfxGetApp-gtLoadIconIDR_MAINFRAME void CCaptureDlg::DoDataExchangeCDataExchange pDX AFX_DATA_MAP BEGIN_MESSAGE_M APCCaptureDlg CDialog //AFX_MSG_MAP END_MESSAGE_MAP BOOL CCaptureDlg::OnInitDialog SetIconm_hIcon TRUE // Set big icon SetIconm_hIcon FALSE // Set small icon m_Key.SetCurSel0 RegisterHotkey CMenu pMenuGetSystemMenuFALSE pMenu-gtDeleteMenuSC_MAXIMIZEMF_BYCOMMAND pMenu-gtDeleteMenuSC_SIZEMF_BYCOMMAND pMenu-gtDeleteMenuSC_RESTOREMF_BYCOMMAND return TRUE // return TRUE unless you set the focus to a control void CCaptureDlg::OnSysCommandUINT nID LPARAM lParam else void CCaptureDlg::OnPaint else HCURSOR CCaptureDlg::OnQueryDragIcon void CCaptureDlg::OnCancel void CCaptureDlg::OnAbout void CCaptureDlg::OnBrowse void CCaptureDlg::SaveBmp CDC dc dc.CreateDCquotDISPLAYquotNULLNULLNULL CBitmap bm int WidthGetSystemMetricsSM_CXSCREEN int HeightGetSystemMetricsSM_CYSCREEN bm.CreateCompatibleBitmapampdcWidthHeight CDC tdc tdc.CreateCompatibleDCampdc CBitmappOldtdc.SelectObjectampbm tdc.BitBlt00WidthHeightampdc00SRCCOPY tdc.SelectObjectpOld BITMAP btm bm.GetBitmapampbtm DWORD sizebtm.bmWidthBytesbtm.bmHeight LPSTR lpDataLPSTRGlobalAllocPtrGPTRsize BITMAPINFOHEADER bih bih.biBitCountbtm.bmBitsPixel bih. biClrImportant0 bih.biClrUsed0 bih.biCompression0 bih.biHeightbtm.bmHeight bih.bi.
上一篇:
【精品】嵌入式专业介绍5
下一篇:
哈弗F7 VS名爵HS,谁更懂得年轻人的心?