[源码]软件“windows按钮突破大师”(转载)
2006-11-24 13:11
155 查看
自己做个"WINDOWS按钮突破大师"
--------------------------------------------------------------------------------
--------------Enable You!.cpp-----------------------
入口函数
#include "main.h"
#include "resource.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_MAIN), NULL, Main_Proc);
return(0);
}
------------------main.cpp----------------------------------------
#include <windows.h>
#include <windowsx.h>
#include "main.h"
#include "resource.h"
#include "stdio.h"
#include "stdlib.h"
int i;
typedef unsigned (__stdcall *LPTHREADFUNC)(void *);
BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
//BEGIN MESSAGE CRACK
HANDLE_MSG(hWnd, WM_INITDIALOG, Main_OnInitDialog);
HANDLE_MSG(hWnd, WM_COMMAND, Main_OnCommand);
HANDLE_MSG(hWnd,WM_CLOSE, Main_OnClose);
//END MESSAGE CRACK
}
return FALSE;
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnInitDialog
BOOL Main_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
// Set app icons
HICON hIcon = LoadIcon((HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE) ,MAKEINTRESOURCE(IDI_ICONAPP));
SendMessage(hwnd, WM_SETICON, TRUE, (LPARAM)hIcon);
SendMessage(hwnd, WM_SETICON, FALSE, (LPARAM)hIcon);
int k=0;
SetWindowText(GetDlgItem(hwnd,IDC_EDIT_TIME),"5");
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnCommand
void Main_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
{
char temp2[64],temp[64],Time[64];
int k=0;
HMENU hMenu,hSubMenu;
HWND Main;
switch(id)
{
case IDC_BUTTON_ENABLE:
i=0;
GetWindowText(GetDlgItem(hwnd,IDC_EDIT_TIME),Time,GetWindowTextLength(GetDlgItem(hwnd,IDC_EDIT_TIME))+1);
sprintf(temp2,"程序将在%d秒后启动,请做好准备,迅速切换至要执行突破的窗口.(^_^)",atoi(Time));
MessageBox(hwnd,temp2,"提示",MB_OK);
Sleep(atoi(Time)*1000);
Main=GetForegroundWindow();
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)"Discover Symbols:.../n");
EnumChildWindows(Main,EnumChildProc,(LPARAM)Main) ;
//Enable Menu
hMenu=GetMenu(Main);
itoa(GetMenuItemCount(hMenu),temp2,10);
wsprintf(temp,"Discover MenuItems :%d /n",temp2);
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)temp);
for (;k<GetMenuItemCount(hMenu);k++)
{
EnableMenuItem(hMenu,GetMenuItemID(hMenu,k),MF_ENABLED);
hSubMenu=GetSubMenu(hMenu,0);
EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,0),MF_ENABLED);
}
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)"完成!");
break;
case IDC_BUTTON_HELP:
MessageBox(hwnd,
"Windows按钮突破者(Enable You!),彻底摧毁灰色控件!/n在Time:框中填入开始时间(秒)/n/t/ Made By 全金属外壳"
,"About",MB_OK);
break;
default:break;
}
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnClose
void Main_OnClose(HWND hwnd)
{
EndDialog(hwnd, 0);
}
////////////////////////////////////////////////////////////////////////////////////
BOOL CALLBACK EnumChildProc( HWND hwndChild,LPARAM lParam_hmain)
{
EnableWindow(hwndChild,TRUE) ;
return true;
}
//////////////////////////////////////////////////////////////////////////
--------------------------------------------------------------------------------
--------------Enable You!.cpp-----------------------
入口函数
#include "main.h"
#include "resource.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_MAIN), NULL, Main_Proc);
return(0);
}
------------------main.cpp----------------------------------------
#include <windows.h>
#include <windowsx.h>
#include "main.h"
#include "resource.h"
#include "stdio.h"
#include "stdlib.h"
int i;
typedef unsigned (__stdcall *LPTHREADFUNC)(void *);
BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
//BEGIN MESSAGE CRACK
HANDLE_MSG(hWnd, WM_INITDIALOG, Main_OnInitDialog);
HANDLE_MSG(hWnd, WM_COMMAND, Main_OnCommand);
HANDLE_MSG(hWnd,WM_CLOSE, Main_OnClose);
//END MESSAGE CRACK
}
return FALSE;
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnInitDialog
BOOL Main_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
// Set app icons
HICON hIcon = LoadIcon((HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE) ,MAKEINTRESOURCE(IDI_ICONAPP));
SendMessage(hwnd, WM_SETICON, TRUE, (LPARAM)hIcon);
SendMessage(hwnd, WM_SETICON, FALSE, (LPARAM)hIcon);
int k=0;
SetWindowText(GetDlgItem(hwnd,IDC_EDIT_TIME),"5");
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnCommand
void Main_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
{
char temp2[64],temp[64],Time[64];
int k=0;
HMENU hMenu,hSubMenu;
HWND Main;
switch(id)
{
case IDC_BUTTON_ENABLE:
i=0;
GetWindowText(GetDlgItem(hwnd,IDC_EDIT_TIME),Time,GetWindowTextLength(GetDlgItem(hwnd,IDC_EDIT_TIME))+1);
sprintf(temp2,"程序将在%d秒后启动,请做好准备,迅速切换至要执行突破的窗口.(^_^)",atoi(Time));
MessageBox(hwnd,temp2,"提示",MB_OK);
Sleep(atoi(Time)*1000);
Main=GetForegroundWindow();
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)"Discover Symbols:.../n");
EnumChildWindows(Main,EnumChildProc,(LPARAM)Main) ;
//Enable Menu
hMenu=GetMenu(Main);
itoa(GetMenuItemCount(hMenu),temp2,10);
wsprintf(temp,"Discover MenuItems :%d /n",temp2);
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)temp);
for (;k<GetMenuItemCount(hMenu);k++)
{
EnableMenuItem(hMenu,GetMenuItemID(hMenu,k),MF_ENABLED);
hSubMenu=GetSubMenu(hMenu,0);
EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,0),MF_ENABLED);
}
SendMessage(GetDlgItem(hwnd,IDC_EDIT_DEBUG),EM_REPLACESEL,1,(LPARAM)"完成!");
break;
case IDC_BUTTON_HELP:
MessageBox(hwnd,
"Windows按钮突破者(Enable You!),彻底摧毁灰色控件!/n在Time:框中填入开始时间(秒)/n/t/ Made By 全金属外壳"
,"About",MB_OK);
break;
default:break;
}
}
////////////////////////////////////////////////////////////////////////////////
// Main_OnClose
void Main_OnClose(HWND hwnd)
{
EndDialog(hwnd, 0);
}
////////////////////////////////////////////////////////////////////////////////////
BOOL CALLBACK EnumChildProc( HWND hwndChild,LPARAM lParam_hmain)
{
EnableWindow(hwndChild,TRUE) ;
return true;
}
//////////////////////////////////////////////////////////////////////////
相关文章推荐
- Windows下用Git下载android源码 转载
- [毕业生的商业软件开发之路]Windows窗体设计概念及原则 (转载自博客园)
- 软件发布:网页设计师必备 之 屏幕取色工具 附源码(支持Windows 2008)
- Windows下阅读linux源码的强大软件Source Insight
- Windows系统必备的30个免费开源软件 (转载)
- (转载)Linux如何编译安装源码包软件
- android最全学习资料及路线整理分享 (安卓视频教程 从入门到大师 android开发环境搭建 windows和MAC 安卓源码大全4000套)
- 软件开发人员必须具备的20款免费的windows下的工具(转载)
- (转载)Linux如何编译安装源码包软件
- 【转载来自 Aplo 大牛】破解 DNGuard HVM 2007 软件保护功能(更新加源码)
- [转载]Windows 2012 R2安装SharePoint 2013 手动安装工具软件
- [转载]一个Linux下抓包软件(源码)
- (转载)Linux如何编译安装源码包软件
- 第二人生的源码分析(九十五)LLCheckBoxCtrl类实现复选按钮 - 大坡3D软件开发 - CSDNBlog
- 在windows下下载android源码(转载)
- 源码推荐(5.18):广告图片无限轮播控件,模仿Windows单选 多选按钮
- Postgresql8.4.2源码在windows下的编译(转载,协作,不断更新)
- 网络管理必备工具软件精解(Windows版)---转载及个人见解
- 如何在windows下下载android源码(转载)
- 2-1 Windows软件 --- FTP简单服务器搭建(win7,转载)