VS2012无法解析外部符号_WinMainCRTStartup
#include"resource.h"#include<Windows.h>HHOOKhHook=NULL;LRESULTCALLBACKHookProc(intcod...
#include "resource.h"#include <Windows.h>
HHOOK hHook = NULL;
LRESULT CALLBACK HookProc(int code,WPARAM wparam,LPARAM lparam);
int CALLBACK DlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPRARM lParam );{ int APIENTRY WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd ){ returnDialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG,NULL,DlgProc);}
int CALLBACK DlgProc( HWND hDlg, UINT uMsg, WPARAM wParam LPARAM lParam ){ switch ( uMsg ) { case WM_COMMAND: { switch ( LOWORD(wParam ) ) { case IDCANCEL: UnhookWindowsHookEx(hHook); EndDialog(hDlg,wParam); } break; case IDOK: { hHook = SetWindowsHookEs(WH_JOURNALRECODE,HookProc,GetModuleHandle(NULL),0; } break; } } break; case WM_CLOSE: { EndDialog( hDig, 0 ); } break;} return 0;}
LRESULT CALLBACK HookProc(int code,WPARAM wparam,LPARAM lparam){ HWND hwnd; POINT point; //获取鼠标的位置 GetCursorPos(&piont); hwnd = WindowFromPoint (point); long nStyle = GetWindowLong (hwnd,GWL_STYLE); EVENTMSG * event = (EVENTMSG * )lparam; if(event->message == WM_LBUTTONDOWN) { //是否为密码框 if(nStyle&ES_PASSWORD) { PostMassage (hwnd,EM_SETPASSWORDCHAR,0,0); } } return CallNextHookEx(hHook,code,wparam,lpanram);} 展开
HHOOK hHook = NULL;
LRESULT CALLBACK HookProc(int code,WPARAM wparam,LPARAM lparam);
int CALLBACK DlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPRARM lParam );{ int APIENTRY WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd ){ returnDialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG,NULL,DlgProc);}
int CALLBACK DlgProc( HWND hDlg, UINT uMsg, WPARAM wParam LPARAM lParam ){ switch ( uMsg ) { case WM_COMMAND: { switch ( LOWORD(wParam ) ) { case IDCANCEL: UnhookWindowsHookEx(hHook); EndDialog(hDlg,wParam); } break; case IDOK: { hHook = SetWindowsHookEs(WH_JOURNALRECODE,HookProc,GetModuleHandle(NULL),0; } break; } } break; case WM_CLOSE: { EndDialog( hDig, 0 ); } break;} return 0;}
LRESULT CALLBACK HookProc(int code,WPARAM wparam,LPARAM lparam){ HWND hwnd; POINT point; //获取鼠标的位置 GetCursorPos(&piont); hwnd = WindowFromPoint (point); long nStyle = GetWindowLong (hwnd,GWL_STYLE); EVENTMSG * event = (EVENTMSG * )lparam; if(event->message == WM_LBUTTONDOWN) { //是否为密码框 if(nStyle&ES_PASSWORD) { PostMassage (hwnd,EM_SETPASSWORDCHAR,0,0); } } return CallNextHookEx(hHook,code,wparam,lpanram);} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询