Olá, achei esse código na net e estou postando aqui na PZ
Obs: Não testei.
Código:
///I coi
//icoi
//Controller.cpp
///
void __declspec(naked) iconHook()
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON1));//chuckhai
static DWORD dwJmp = 0x004D0E3C;
_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}
bool Controller::Load()
{
this->VKF9_State = 0;
if( !this->MouseHook )
{
this->MouseHook = SetWindowsHookEx(WH_MOUSE, this->Mouse, gController.Instance, GetCurrentThreadId());
// ----
if( !this->MouseHook )
{
return false;
}
}
// ----
if( !this->KeyboardHook )
{
this->KeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, this->Keyboard, gController.Instance, NULL);
// ----
if( !this->KeyboardHook )
{
return false;
}
}
//chuckhai
SetRange((LPVOID)0x004D0E2F, 13, ASM::NOP);
SetOp((LPVOID)0x004D0E2F, iconHook, ASM::CALL);
return true;
}
////
///
///giòng chữ
////
void Interface::Work() {
char test[500];
sprintf_s(test, sizeof(test), "Server: %s || Player: %s || Level: %d ", gProtect.m_MainInfo.WindowName, gObjUser.lpPlayer->Name, gObjUser.lpPlayer->Level);
SetWindowText(pGameWindow, test);
}
//
// chuckhai
Créditos:
chuckhai