📄 reference.cpp
字号:
//1 Sample1 main frame for the graph program.
hDC=BeginPaint(hWnd,&PtStr);
hPen=(HPEN)GetStockObject(NULL_PEN);//get empty brush
SelectObject(hDC,hPen);
hBrush=(HBRUSH)GetStockObject(BLACK_BRUSH);
SelectObject(hDC,hBrush);
hPen=CreatePen(PS_SOLID,2,RGB(255,0,0));//create pen
SelectObject(hDC,hPen);
//main part of drawing
DeleteObject(hPen);
DeleteObject(hBrush);
EndPaint(hWnd,&PtStr);
//Ulti function for draw
1)
MoveToEx(hDC,posX+(j-1)*step,posY,NULL);
2)
LineTo(hDC,posX+(j-1)*step,posY+400);
3)
Ellipse(hDC,posX+arr[i]*50,posY+(j-1)*50,posX+(arr[i]+1)*50,posY+j*50);
4)
POINT points[6]={{100,212},{70,227},{70,250},{130,250},{130,227},{100,212}};
Polyline(hDC,points,6);
5)
Arc(hDC,63,137,138,212,100,137,100,137);
6)
Rectangle(hDC,213,212,287,250);
7)
RoundRect(hDC,213,100,287,137,20,20);
//Ulti funtion in program
1)
TextOut(hDC,50,50,"Hello World!",strlen("Hello World!"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -