- UID
- 418
- 精华
- 积分
- 3994
- 威望
- 点
- 宅币
- 个
- 贡献
- 次
- 宅之契约
- 份
- 最后登录
- 1970-1-1
- 在线时间
- 小时
|
发表于 2015-7-31 16:41:56
|
显示全部楼层
- #include <stdio.h>
- #include <string.h>
- #include <windows.h>
- int main()
- {
-
- int rtn;
-
- HWND h_Keyboard=0;
- char szMe[256] = {0};
- HKEY hKey;
- strcpy(szMe, GetModuleFileName(NULL, szMe, 255));
- if (RegOpenKey(HKEY_CURRENT_USER, "Software\\microsoft\\windows\\currentversion\\run", &hKey) == ERROR_SUCCESS)
- {
- if (RegSetValueEx(hKey, "KBD_ADDIN", NULL, REG_SZ, (const BYTE*)&szMe, strlen(szMe)) != ERROR_SUCCESS)
- {
- MessageBox(NULL, "Can Not Create Key", "Error", MB_OK);
- }
- RegCloseKey(hKey);
- }
- else
- MessageBox(NULL, "Can Not Open Key", "Error", MB_OK);
- while(1)
- {
- h_Keyboard=FindWindowA("IPTip_Main_Window","");
- if (h_Keyboard)
- {
- GetWindowLong(h_Keyboard,rtn);
-
- rtn=rtn+WS_EX_LAYERED+WS_EX_NOACTIVATE;
-
- SetWindowLong(h_Keyboard,-20,rtn);
- SetLayeredWindowAttributes(h_Keyboard,0,100,2);
- }
- }
- return 0;
- }
复制代码 |
|