使用滚动条模板:https://www.cnblogs.com/eternalmoonbeam/p/10827792.html

#define _USE_MATH_DEFINES
#include<cmath>

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

在WM_PAINT——BeginPaint和EndPaint中写:

		x = xChar * xPos;
		y = yChar * yPos;
		MoveToEx(hdc, xStar - x, yStar - y, NULL);
		LineTo(hdc, xStar - SideLength / 2 - x,
			yStar + SideLength * (cos(double(3 * M_PI / 10)) + cos(double(M_PI / 10))) - y);
		LineTo(hdc, xStar + SideLength * cos(double(M_PI / 5)) - x,
			yStar + SideLength * cos(double(3 * M_PI / 10)) - y);
		LineTo(hdc, xStar - SideLength * cos(double(M_PI / 5)) - x,
			yStar + SideLength * cos(double(3 * M_PI / 10)) - y);
		LineTo(hdc, xStar + SideLength / 2 - x,
			yStar + SideLength * (cos(double(3 * M_PI / 10)) + cos(double(M_PI / 10))) - y);
		LineTo(hdc, xStar - x, yStar - y);

  

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄