[英]creating a window in c++ using Winbgim
我想在主監視器中創建一個全屏窗口。 我已經完成了,但是窗口從坐標 3x0 而不是 0x0 開始。 我該怎么做才能更正我的代碼?
這是我的代碼:
#include <graphics.h>
int main()
{
int hor=GetSystemMetrics(SM_CXSCREEN);
int ver=GetSystemMetrics(SM_CYSCREEN);
initwindow(hor, ver, "Convex Hull", 0, 0);
getch();
closegraph();
return( 0 );
}
PS 我在 CodeBlocks-EP IDE 環境中使用 WinBGIm 圖形庫
提前致謝
我們來看看函數:
int initwindow(int width, int height, const char* title="Windows BGI", int left=0, int top=0)
您所要做的就是設置頂部和左側,以便它適合您的屏幕,在我的情況下是這樣的:
initwindow(1920,1009, "Window",-8,-1);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.