有道词典去广告

有道电子词典,确实很好用,但是现在越来越多的广告,也确实让人烦。

去掉有道的广告,让其清爽一些,看来真的很有必要

HWND hWnd = FindWindow(_T("YodaoMainWndClass"), _T("有道词典"));
	if ( hWnd != NULL )
	{
		HWND hAdWnd = FindWindowEx( hWnd, NULL, _T("YdAdvWnd"), _T("YdAdvWnd"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, _T("Button"), _T("主菜单"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, _T("Button"), _T("有道学堂"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, _T("Button"), _T("有道专业翻译"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, NULL, _T("InfoBar"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, _T("Button"), _T("单词本"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );

		hAdWnd = FindWindowEx( hWnd, NULL, _T("Button"), _T("迷你窗口"));
		::SendMessage( hAdWnd, WM_CLOSE, 0, 0 );
	}



你可能感兴趣的:(null,button)