Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pragma once
- #include <windows.h>
- #include <conio.h>
- #include <iostream>
- using namespace std;
- #include "Classes.h"
- #define KEY_DOWN(vk_code)((GetAsyncKeyState(vk_code)) & 0x8000 ? 1 : 0)
- void PressKey(int VkCode);
- HDC hdc;
- int main()
- {
- int X_0 = 300;
- int Y_0 = 0;
- int Scale_0 = 1;
- system("color F0");
- HWND hwnd = GetConsoleWindow();
- if (hwnd != NULL)
- {
- hdc = GetWindowDC(hwnd);
- if (hdc != 0)
- {
- Point* ptr;
- Grinder AGrinder(X_0, Y_0, Scale_0);
- ptr = &AGrinder;
- PressKey(50);//2
- ptr->Show();
- PressKey(51);//3
- ptr->Drag(40);
- PressKey(52);//4
- Point* p2 = new Rock(X_0, Y_0, Scale_0);
- p2->Show();
- PressKey(53);//5
- ptr->Hide();
- PressKey(54);//6
- }
- }
- }
- void PressKey(int VkCode)
- {
- while (1)
- {
- if (KEY_DOWN(VkCode))
- {
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement