hello everyone!
i am learning windows.h but i have problems that how to use the functions like Arc(); CreateFont(); CreatePen(); CreateSolidBrush(); etc. what is meant by hdc and what will be passed to it?
A hDC is a handle to a device context. A device context is a kind of drawing context where you can draw images, hsapes or text. Normally you get it from BeginPaint in your Windows proc when you handle WM_PAINT
Actually this is the code:
But I don't Know What will be passed to first argument, which I have mentioned in the comment:
1 2 3 4 5 6 7 8 9 10
#include<iostream>
#include<conio.h>
#include<windows.h>
usingnamespace std;
int main()
{
Arc(/*what will be passed here?*/,23,12,42,14,24,54,32,12);
getch();
}
For a real GUI you need to create a windows application not a console application.
Though it's possible to draw on the console this is only suitable for some quick demos.