Advertisement
baadgeorge

Untitled

Apr 19th, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. # pragma once
  2.  
  3. #include <windows.h>
  4. #include <conio.h>
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. #include "Classes.h"
  10. #define KEY_DOWN(vk_code)((GetAsyncKeyState(vk_code)) & 0x8000 ? 1 : 0)
  11.  
  12. void PressKey(int VkCode);
  13.  
  14. HDC hdc;
  15.  
  16. int main()
  17. {
  18. int X_0 = 300;
  19. int Y_0 = 0;
  20. int Scale_0 = 1;
  21. system("color F0");
  22.  
  23. HWND hwnd = GetConsoleWindow();
  24.  
  25. if (hwnd != NULL)
  26. {
  27. hdc = GetWindowDC(hwnd);
  28. if (hdc != 0)
  29. {
  30. Point* ptr;
  31. Grinder AGrinder(X_0, Y_0, Scale_0);
  32. ptr = &AGrinder;
  33. PressKey(50);//2
  34. ptr->Show();
  35. PressKey(51);//3
  36. ptr->Drag(40);
  37. PressKey(52);//4
  38. Point* p2 = new Rock(X_0, Y_0, Scale_0);
  39. p2->Show();
  40. PressKey(53);//5
  41. ptr->Hide();
  42. PressKey(54);//6
  43. }
  44. }
  45.  
  46. }
  47. void PressKey(int VkCode)
  48. {
  49. while (1)
  50. {
  51. if (KEY_DOWN(VkCode))
  52. {
  53. break;
  54. }
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement