SetWindowsHookEx makes the taskbar scrambled, while 'News and Interests' was turned off

Viewed 73

My OS is Windows 10 21H1, and 'Scale and layout' setting of the display is '150%' (not '100%'). I turned off the 'News and Interests' by using the context of a taskbar.

Once SetWindowsHookEx called, the notification area of the taskbar became scrambled(garbled) and the date/time area is not shown.

I called SetWindowsHookEx like below.

g_hHook = SetWindowsHookEx(WH_CALLWNDPROCRET, CallWndProc, g_hDLL, 0 );

and CallWndProc is

LRESULT CALLBACK CallWndProc( int nCode, WPARAM wParam, LPARAM lParam )
{
    return CallNextHookEx(g_hHook, nCode, wParam, lParam);
}

How can I use the SetWindowsHookEx function to avoid the taskbar scrambled?

Sorry for my poor English and ANY help will be greatly appreciated.

0 Answers
Related