Skip to content

Instantly share code, notes, and snippets.

@puppis42
Created May 28, 2023 10:50
Show Gist options
  • Save puppis42/429be12ffb7158cf5f2822196a6d3a35 to your computer and use it in GitHub Desktop.
Save puppis42/429be12ffb7158cf5f2822196a6d3a35 to your computer and use it in GitHub Desktop.
#include <windows.h>
#include <tchar.h>
#include <iostream>
using namespace std;
int main()
{
HWND hWnd = FindWindow(_T("Shell_TrayWnd"), NULL);
if (hWnd != NULL)
{
hWnd = FindWindowEx(hWnd, NULL, _T("DynamicContent2"), NULL);
if (hWnd != NULL)
{
cout << "HWND: " << hWnd << "\n";
ShowWindow(hWnd, SW_HIDE);
system("pause");
ShowWindow(hWnd, SW_SHOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment