Last active
June 4, 2019 22:58
-
-
Save u27a4/b2bd2df8feb5b32237ba3131046e91cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <text.h> | |
BOOL EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, HTEXT source) | |
{ | |
switch (message) | |
{ | |
case TWM_EVENT: | |
switch (wParam) | |
{ | |
case ID_IDLE: | |
case ID_IDLE1: | |
case ID_MUSMOV: | |
case ID_MUSFAC: | |
case ID_WHEEL: | |
case ID_ONINS: | |
case ID_ONDEL: | |
case ID_SELC: | |
case ID_SELCL: | |
case ID_SELCP: | |
case ID_SELCLT: | |
case ID_STAT: | |
case ID_TIP: | |
case ID_TITLE: | |
// 頻繁に来るイベントをすべて無視 | |
break; | |
default: | |
printf("TWM_EVENT (ID_%ID, %X) \n", wParam, lParam); | |
break; | |
} | |
break; | |
case TWM_COMMAND: | |
switch (wParam) | |
{ | |
case ID_FILE: | |
printf("最近使用したファイル"); | |
return TRUE; | |
default: | |
printf("TWM_COMMAND (ID_%ID, %X)\n", wParam, lParam); | |
break; | |
} | |
break; | |
case TWM_NOTIFY: | |
// printf("TWM_NOTIFY (ID_%ID, %X)\n", wParam, lParam); | |
break; | |
} | |
return FALSE; | |
} | |
main { | |
vsethook(NULL, (WHOOKPROC)EventProc, NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment