Tập tành làm game console

#include <stdio.h>
#include <windows.h>

void resizeConsole(int width, int height);

int main()
{

}
// Hàm thay đổi kích cỡ của khung cmd.
void resizeConsole(int width, int height)
{
	HWND console = GetConsoleWindow();
	RECT r;
	GetWindowRect(console, &r);
	MoveWindow(console, r.left, r.top, width, height, TRUE);
}

Mọi người cho hỏi cái hàm GetConsoleWindow có phải thuộc thư viện windows.h không mà sao nó báo error: 'GetConsoleWindow' was not declared in this scope

Ko biết bạn dùng IDE nào, nhưng mình xài DevC++ 5.11 ok nhé

2 Likes

Mình dùng codeBlock 13.12

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?