OldSchoolHack

Register / Login English

User Search: 7xCore

Search-Information
7xCore
Threads
Thread Forum Last Post Posts Views
icon

Go to first new post Clock aus tut wird nicht angezeigt Posted on: Thu 6. Oct 2011, 21:25

7xCore

preview Preview

Go To Post

Hallo.
In einem Tut wird ja gezeigt , wie man ne uhr ingame anzeigen lassen kann.
Der code compeliert super , aber die uhr sieht man nicht.
CPP Code:
  1.  
  2. #include <windows.h> //zum Zeichnen
  3. #include <time.h> //für die Uhrzeit
  4. #include <stdio.h>
  5. bool an = true, draw = false;
  6. struct tm *aktuellezeit;
  7. time_t aktuelle_zeit;
  8. char zeit[256];
  9. HWND foreground = NULL;
  10. HDC hdc = NULL;
  11. int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  12. { while(an) //Programm am Laufen halten
  13. { //Tastaturabfrage
  14. if(GetAsyncKeyState(VK_F11))
  15. draw = !draw;
  16. else if(GetAsyncKeyState(VK_F12))
  17. an = !an;
  18. if(draw)
  19. { //Zeit besorgen
  20. time(&aktuelle_zeit);
  21. aktuellezeit = localtime(&aktuelle_zeit);
  22. sprintf(zeit,"[%02d:%02d:%02d]",aktuellezeit->tm_hour,aktuellezeit->tm_min,aktuellezeit->tm_sec);
  23. //Text zeichnen
  24. foreground = GetForegroundWindow();
  25. hdc = GetDC(foreground);
  26. SetBkMode(hdc, TRANSPARENT);
  27. SetTextColor(hdc,RGB(255,0,0));
  28. TextOutA(hdc,10,10, zeit,10);
  29. //der letzte Parameter muss u.U. angepasst werden
  30. UpdateWindow(foreground);
  31. ReleaseDC(foreground,hdc);
  32. } //wir lassen das Programm 1ms schlafen, damit es nicht 100% Auslastung verursacht
  33. Sleep(10);
  34. }
  35. return 0;
  36. }
  37.  

weiß irgendjemand was ?
Tutorials

Thu 10. Nov 2011, 03:16

by yourmt Go to last post
1 398
icon

Go to first new post SWBF 2 hilfe Posted on: Wed 5. Oct 2011, 16:39

7xCore

preview Preview

Go To Post

Hallo Forumcommunity.

Ich hab gerade vor , für das Spiel Starwars Battlefront 2 so anzufangen , hacks zu programmieren.
Das ist für mich ziehmliches Neuland , ich habe nur gute erfahrung in c++.Anfangen werde ich natürlich erstmal , zu versuchen text in dem fenster des spiels anzeigen zu lassen.Ich hab mich schon ein bisschen umgesehen und bin bis jetzt so weit , das ich auf das fenster Zugriff habe.

CPP Code:
  1.  
  2. #include <windows.h>
  3. #include <iostream>
  4. #include <string>
  5. using namespace std;
  6.  
  7. typedef unsigned int uint;
  8.  
  9.  
  10. HANDLE hproc;
  11. DWORD procid;
  12.  
  13. int main(void)
  14. {
  15.  
  16.  
  17. HWND hWnd;
  18.  
  19. hWnd = FindWindow(0,L"Star Wars Battlefront II");
  20. if(!hWnd){
  21. system("color 0C");
  22. cout << "Window nicht gefunden" << endl;
  23. char x;
  24. cin >> x;
  25. return 0;
  26. }
  27. system("color 0A");
  28. cout << hWnd << " gefunden" << endl;
  29.  
  30.  
  31.  
  32.  
  33. GetWindowThreadProcessId(hWnd, &procid);
  34. hproc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procid);
  35.  
  36. CloseHandle(hproc);
  37. return 0;
  38. }
  39.  

So nun hab ich die Funktion SendText gesehen , doch geht das senden von strings nicht, also es wird kein text angezeigt.Jetzt würd ich gerne wissen , wie man das macht , ob es da libs or guis gibt.Oder ein bsp code.

Danke

- 7xCore
VB, C/C++, Delphi, etc

Wed 5. Oct 2011, 16:39

by 7xCore Go to last post
0 298
Downloads
No downloads found.