-
-
[部分原创]我藏我藏我藏藏藏!
-
发表于:
2007-5-25 17:27
6595
-
+---------+------------+-----------------------------+---+----------+-------+
| 开始按钮 |运行应用程序1 | 运行应用程序2... |[<]|托盘通知区域|托盘时钟|
+---------+------------+-----------------------------+---+----------+-------+
// ===========================
// Tools.h : AZMC.13 presents.
// ===========================
#pragma once
class CHackerTools
{
public:
CHackerTools(void);
~CHackerTools(void);
public:
// 任务栏
BOOL TaskbarOnOff( BOOL bFlag );
// 开始按钮
BOOL StartButtonOnOff( BOOL bFlag );
// 托盘
BOOL TrayOnOff( BOOL bFlag );
// 托盘时钟
BOOL TrayClockOnOff( BOOL bFlag );
// 任务栏中运行应用程序
BOOL AppButtonOnOff( BOOL bFlag );
// 托盘通知区域
BOOL NotifyAreaOnOff( BOOL bFlag );
// 托盘伸缩按钮
BOOL TrayExtendedButtonOnOff( BOOL bFlag );
// 程序管理器
BOOL ProgramManagerOnOff( BOOL bFlag );
};
// =============================
// Tools.cpp : AZMC.13 presents.
// =============================
#include "StdAfx.h"
#include ".\tools.h"
CHackerTools::CHackerTools(void)
{
}
CHackerTools::~CHackerTools(void)
{
}
// 任务栏
// ------------------------------------------
BOOL CHackerTools::TaskbarOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::FindWindow( _T("Shell_TrayWnd"),NULL );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 开始按钮
// ----------------------------------------------
BOOL CHackerTools::StartButtonOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0x130 );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 托盘
// ---------------------------------------
BOOL CHackerTools::TrayOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0x12F );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 托盘时钟
// --------------------------------------------
BOOL CHackerTools::TrayClockOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0x12F );
if( hWnd == NULL ) return FALSE;
hWnd = ::GetDlgItem( hWnd,0x12F );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 任务栏中运行应用程序
// --------------------------------------------
BOOL CHackerTools::AppButtonOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0xA005 );
{
HWND hWndSub;
hWndSub = ::FindWindowEx( hWnd,NULL,_T("MSTaskSwWClass"),_T("运行应用程序") );
if( hWndSub != NULL )
{
hWndSub = ::FindWindowEx( hWndSub,NULL,_T("ToolbarWindow32"),_T("运行应用程序") );
if( hWndSub != NULL )
{
hWnd = hWndSub;
}
}
}
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 托盘通知区域
// ---------------------------------------------
BOOL CHackerTools::NotifyAreaOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0x12F );
if( hWnd == NULL ) return FALSE;
hWnd = ::FindWindowEx( hWnd,NULL,_T("SysPager"),_T("") );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 托盘伸缩按钮
// -----------------------------------------------------
BOOL CHackerTools::TrayExtendedButtonOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::GetDlgItem( ::FindWindow( _T("Shell_TrayWnd"),NULL ),0x12F );
if( hWnd == NULL ) return FALSE;
hWnd = ::GetDlgItem( hWnd,0x5DE );
if( hWnd == NULL ) return FALSE;
::ShowWindow( hWnd,bFlag ? SW_SHOW : SW_HIDE );
::UpdateWindow( hWnd );
return TRUE;
}
// 程序管理器
// -------------------------------------------------
BOOL CHackerTools::ProgramManagerOnOff( BOOL bFlag )
{
HWND hWnd;
hWnd = ::FindWindow( NULL,_T("Program Manager") );
if( hWnd == NULL ) return FALSE;
::SetWindowPos( hWnd,NULL,0,0,0,0,
bFlag ? SWP_SHOWWINDOW : SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER
);
return TRUE;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课