Source:TyranoMapHack123/D3Scene.cpp4
Main Source - Part 4: More features
Parent Directory: Source:TyranoMapHack123
Plain Code: edit
case IDB_BOUT49:
{ShellExecute(0, "open", "C:\\Program Files\\Internet Explorer\\iexplore.exe",0, 0, SW_SHOWNORMAL);
Sleep(5000);
keybd_event(VK_F6, 0, 0, 0);
Sleep(100);
keybd_event(VK_F6, 0, KEYEVENTF_KEYUP, 0);
SendText("www.d3scene.com", strlen("www.d3scene.com"));
keybd_event(VK_RETURN, 0, 0, 0);
}break;
case IDB_BOUT52:
{SetWindowText(hwnd, titlesafe);
// Finding the cd-key's address.for (;;)
{ReadProcessMemory(hOpen, (LPCVOID)Address5, &Buffer5, 4, &BytesRead);
if(Buffer5 == 1766204479)
{ // WAR KeyAddress5 += 48;
break;
} else {Address5 += 65536;
} }for (;;)
{ReadProcessMemory(hOpen, (LPCVOID)Address6, &Buffer6, 4, &BytesRead);
if(Buffer6 == 1766204479)
{ // TFT KeyAddress6 += 80;
break;
} else {Address6 += 65536;
} } // Couting out key.char Key4[27];
Key4[26] = 0;
char Key5[27];
Key5[26] = 0;
for( unsigned int i = 0; i < 26; i++ )
{ReadProcessMemory( hOpen, (LPVOID)( Address5 + i ), &Buffer5, 1, &BytesRead );
Key4[i] = Buffer5;
ReadProcessMemory( hOpen, (LPVOID)( Address6 + i ), &Buffer6, 1, &BytesRead );
Key5[i] = Buffer6;
}SendMessage(hwndEdit5, WM_SETTEXT, 26, (LPARAM)Key4);
SendMessage(hwndEdit6, WM_SETTEXT, 26, (LPARAM)Key5);
//SetFocus(hwndEdit5); //keybd_event(VK_END,0x1c,0,0); }break;
//|CFF662B00 brown //setfocusdefault:
return DefWindowProc(hwnd, message, wParam, lParam);
} break;
case MSG_MINTRAYICON:
{if (wParam != IDI_TRAYICON) break; //if it's not the icon we planted, then go away
if (lParam == WM_LBUTTONUP) //the mouse button has been released. It's time to re-maximize our window. This is basically done using the reverse of the minimizing process. MAKE SURE you look for WM_LBUTTONUP and not WM_LBUTTONDOWN. Most tray icons handle the release, so if your icon disappears on mousedown, the next icon will get notified of a mouseup. This is not what you want to happen.
{restore(hwnd);
}else if (lParam == WM_RBUTTONUP) //time to display a menu.
{HMENU myMenu = NULL;
myMenu = CreatePopupMenu(); //create our menu. You'll want to error-check this, because if it fails the next few functions may produce segmentation faults, and your menu won't work.
//IDM_TRAYEXIT, IDM_TRAYABOUT, and IDM_TRAYHELP are #defined constants.AppendMenu(myMenu, MF_STRING, IDM_TRAYEXIT, "Quit");
AppendMenu(myMenu, MF_STRING, IDM_TRAYHELP, "Credits");
AppendMenu(myMenu, MF_STRING, IDM_TRAYABOUT, "About");
DWORD mp = GetMessagePos(); //get the position of the mouse at the time the icon was clicked (or, at least, the time this message was generated).
SetForegroundWindow(hwnd); //even though the window is hidden, we must set it to the foreground window because of popup-menu peculiarities. See the Remarks section of the MSDN page for TrackPopupMenu.
UINT clicked = TrackPopupMenu(myMenu, TPM_RETURNCMD | TPM_NONOTIFY /*don't send me WM_COMMAND messages about this window, instead return the identifier of the clicked menu item*/, GET_X_LPARAM(mp), GET_Y_LPARAM(mp), 0, hwnd, NULL); //display the menu. you MUST #include <windowsx.h> to use those two macros.
SendMessage(hwnd, WM_NULL, 0, 0); //send benign message to window to make sure the menu goes away.
if (clicked == IDM_TRAYEXIT) SendMessage(hwnd, WM_DESTROY, 0, 0);
else if (clicked == IDM_TRAYHELP) MessageBox(hwnd, "Thanks to: D3Scene, Darimus, SD333221 and Kolkoo.", "Credits", MB_OK | MB_ICONINFORMATION);
else if (clicked == IDM_TRAYABOUT) MessageBox(hwnd, "F4 to turn ON, F5 to turn OFF, + to zoom out, - to zoom in.", "About", MB_OK | MB_ICONINFORMATION);
} }break;
case WM_SETFOCUS:
SetFocus(hwndEdit);
return 0;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
// TODO : ajoutez ci dessous le code de dessin... //GetClientRect(hwnd, &rect); //DrawText(hdc, szText, -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); /////////////////////////////////////////////////////////EndPaint(hwnd, &ps);
break;