hook SetForegroundWindow for profile links

This commit is contained in:
FunkyFr3sh 2023-04-09 20:06:51 +02:00
parent 8643372afe
commit 50d4c0aa81
5 changed files with 13 additions and 3 deletions

View file

@ -40,6 +40,7 @@ CREATEWINDOWEXAPROC real_CreateWindowExA = CreateWindowExA;
DESTROYWINDOWPROC real_DestroyWindow = DestroyWindow;
MAPWINDOWPOINTSPROC real_MapWindowPoints = MapWindowPoints;
SHOWWINDOWPROC real_ShowWindow = ShowWindow;
SETFOREGROUNDWINDOWPROC real_SetForegroundWindow = SetForegroundWindow;
SETWINDOWSHOOKEXAPROC real_SetWindowsHookExA = SetWindowsHookExA;
GETDEVICECAPSPROC real_GetDeviceCaps = GetDeviceCaps;
LOADLIBRARYAPROC real_LoadLibraryA = LoadLibraryA;
@ -76,6 +77,7 @@ static HOOKLIST g_hooks[] =
{ "DestroyWindow", (PROC)fake_DestroyWindow, (PROC*)&real_DestroyWindow, 0 },
{ "MapWindowPoints", (PROC)fake_MapWindowPoints, (PROC*)&real_MapWindowPoints, 0 },
{ "ShowWindow", (PROC)fake_ShowWindow, (PROC*)&real_ShowWindow, 0 },
{ "SetForegroundWindow", (PROC)fake_SetForegroundWindow, (PROC*)&real_SetForegroundWindow, 0 },
{ "", NULL, NULL, 0 }
}
},

View file

@ -526,6 +526,11 @@ BOOL WINAPI fake_ShowWindow(HWND hWnd, int nCmdShow)
return real_ShowWindow(hWnd, nCmdShow);
}
BOOL WINAPI fake_SetForegroundWindow(HWND hWnd)
{
return TRUE;
}
HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId)
{
if (idHook == WH_KEYBOARD_LL && hmod && GetModuleHandle("AcGenral") == hmod)

View file

@ -17,7 +17,7 @@
LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
/*
/**/
TRACE(
" uMsg = %s (%d), wParam = %08X (%d), lParam = %08X (%d)\n",
dbg_mes_to_str(uMsg),
@ -26,7 +26,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
wParam,
lParam,
lParam);
*/
static BOOL in_size_move = FALSE;
static int redraw_count = 0;