ZKX's LAB

VC6.0下能运行C语言画圆函数 vc 6椭圆函数

2021-04-25知识3

VC用CDC的类方法画圆,怎么感觉是个椭圆啊? 是显示器的分辨率没有设置好,建议更改一下分辨率即可。分辨率可以从显示分辨率与图像分辨率两个方向来分类。显示分辨率(屏幕分辨率)是屏幕图像的精密度,是指显示器所能显示的像素有多少。由于屏幕上的点、线和面都是由像素组成的,显示器可显示的像素越多,画面就越精细,同样的屏幕区域内能显示的信息也越多,所以分辨率是个非常重要的性能指标之一。可以把整个图像想象成是一个大型的棋盘,而分辨率的表示方式就是所有经线和纬线交叉点的数目。显示分辨率一定的情况下,显示屏越小图像越清晰,反之,显示屏大小固定时,显示分辨率越高图像越清晰。

用VC++编一个可以保存椭圆(包括正圆)上所有点坐标的函数,请教高手 BOOL EllipseHDC hdc,/handle to DCint nLeftRect,/x-coord of upper-left corner of rectangleint nTopRect,/y-coord of upper-left corner of rectangleint nRightRect,/x-coord of lower-right corner of rectangleint nBottomRect/y-coord of lower-right corner of rectangleRequirementsWindows NT/2000/XP:Included in Windows NT 3.1 and later.Windows 95/98/Me:Included in Windows 95 and later.Header:Declared in Wingdi.h;include Windows.h.Library:Use Gdi32.lib.HBRUSH CreateSolidBrushCOLORREF crColor/brush color valueDeclared in Wingdi.h;include Windows.h.Library:Use Gdi32.lib.to MSDN,if possible.

怎么让VC子窗口变成椭圆形? VB的例子:调用的是API函数Attribute VB_Name=\"Module1Public Declare Function CreatePolygonRgn_Lib\"gdi32\"_(_lpPoint As POINTAPI,ByVal nCount As Long,_ByVal nPolyFillMode As Long_As LongPublic Type POINTAPIx As Longy As LongEnd Type'-'以上为声明CreatePolygonRgn函数和它需要的POINTAPI类型Public Declare Function SetWindowRgn_Lib\"user32\"_(_ByVal hWnd As Long,ByVal hRgn As Long,_ByVal bRedraw As Boolean_As LongPublic Const ALTERNATE=1'-''以上为声明SetWindowRgn函数和它需要的常量Public Sub Poly(f As Form)Dim hdc1 As LongDim rec(37)As POINTAPIrec(0).x=102rec(0).y=11rec(1).x=12rec(1).y=102rec(2).x=11rec(2).y=107rec(3).x=10rec(3).y=119rec(4).x=11rec(4).y=124rec(5).x=13rec(5).y=127rec(6).x=72rec(6).y=187rec(7).x=51rec(7).y=211rec(8).x=50rec(8).y=227rec(9).x=52rec(9).y=230rec(10).x=52rec(10).y=233rec(11).x=54rec(11).y=235rec(12).x=55rec(12).y=237rec(13).x=60rec(13).y=241rec(14).x=64rec(14).y=234rec(15).x=66rec(15).y=246rec(16).x=72。

随机阅读

qrcode
访问手机版