```
// mat01genaratedat19sys01.cpp : 定义应用程序的入口点。
//
#include "stdafx.h"
#include "mat01genaratedat19sys01.h"
#include<iostream>
#include <iomanip>
#include <fstream>
#include<string>
#include"hiredishelper.h"
#include"oval.h"
#define MAX_LOADSTRING 100
// 全局变量:
//搜索:14159265358979323846264338327950288419716939937510得到:
long double Pild = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196;
long double Pild64bit = 3.141592653589793115997963468544185161590576171875;
////
long double Pildwin32 = 3.141592653589793;//115997963468544185161590576171875; ///win32位
int Y_high1000 = 1000;
long double Max9long9doub9 = 1.797693e+308;//1.797693e+308;这是能输入的最大数了 99999999999999999999.9; //20个9则整数常量太大 40个9
// 12345678901234567890
double max9little19doub91 = 999999999999999; //整数常量不 (太大) 19个9
long double max9doub9 = (double)max9little19doub91;
//上面两个精度都是 1.234567890234567//仅仅有17位精度,小数点后16位
HINSTANCE hInst; // 当前实例
WCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本
WCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名
//全局变量:
//绘制椭圆的全局变量:110
std::ofstream cou02t;
PBLIB::Redis::hiredisUtility redi001;
//初始值,只用来初始化 Reids中数值
double lightResX1000 = 1000;
double lightResY1000 = 1000;
double lightResX_res = 1000;
double lightResY_res = 1000;
double viewWdistorteOrigin = 1.0;
double pianyi400_X = 400;
double pianyi400_Y = 400;
//int
double lightRy_origin160 = 2.0;// 0.50;// 160;
double lightRy_origin_3 = 3.0;
double xy00X1 = 0.0;//*100
double xy00Y1 = 0.0;
double xy00X2 = 2.0 * 100;// 100;
double xy00Y2 = 0.0;//*100
double xy00X3 = 1.0 * 100;// *100;
double xy00Y3 = sqrt(3.0) * 100;//*100; //1.732
double xa1, ya1, xa2, ya2, xa3, ya3;
double lihtInitiaChushiX00 = -0.1;
double lightInitiaChushi0Y00 = -0.02;
double lightInitiaChushi00Ang = -0.001;
//欧几里德距离(的平方
double squareOf_EuclidDistance(double x1, double y1, double x2, double y2) {
double tmp_doublle = abs((x1 - x2)*(x1 - x2)) + abs((y1 - y2)*(y1 - y2));
return tmp_doublle;
}//squareOf_EuclidDistance
double L12;
double L23;
double L13;
double
min_trinagCircumference0Len00 = L12 + L23 + L13;
double
order3linesL6_21plus = 606.6;// 6.213;//赋予 皮条线的初始长度
double
realLengthof3LinesSegments3All_plus = order3linesL6_21plus;
//
Oval ova06[6] = { {0.0, 0.0, 0.0, 0.0, 0.0}, //order3linesL },
{0.0,0.0,0.0,0.0, 0.0 },
{0.0,0.0,0.0,0.0, 0.0},
{0.0,0.0,0.0,0.0, 0.0},
{0.0,0.0,0.0,0.0, 0.0},
{0.0,0.0,0.0,0.0, 0.0} };
double originEdges[3][2];
COLORREF image06ova[1000][1000];
// 此代码模块中包含的函数的前向声明:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{//注意wWinMain主程序
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: 在此处放置代码。
//调用Console控制台
AllocConsole();
#pragma warning(disable:4996)
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stdout);
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stderr);
_tfreopen(TEXT("CONIN$"), TEXT("r"), stdin);
#pragma warning(default:4996)
_tsetlocale(LC_ALL, TEXT("chs"));//头:<iomanip> LC_ALL=chs支持中文
//
std::cout << std::setprecision(999) << Pild << std::endl;
// Max9long9doub9 = 99999999999999999999.9; //20个9则整数常量太大 40个9
// 12345678901234567890
// double max9little19doub91 = 9999999999999999999; //整数常量不 (太大) 19个9
// long double max9doub9=(double)max9little19doub91;
std::cout <<"[Max9long9doub9:"<< std::setprecision(999) << Max9long9doub9 << std::endl;
std::cout << "[max9doub9:" << std::setprecision(999) << max9doub9 << std::endl;
//
//模块110(一)
PBLIB::Redis::hiredisUtility red001;
//测试Redis内存数据库
{//11test0
// PBLIB::Redis::hiredisUtility red001;
//red001.Start();// 内部异步实现了自动重连
std::string str, str1;
red001.Connect(1000);//开始连接Redis
//
{
red001.Get("ABC", str1);//获取key
std::cout << str1 << std::endl;
//get3order
std::string str3;
std::string str_a = "ac34";
str3 = red001.get1s3order("ab2", str_a);
std::cout << str3 << std::endl;
}
//
}//11test0
//
//初始化oval参数
{//110
//(再)测试redis和三目读取
{
std::string pingpong, pingpong2, pong3;
std::string str0001 = "w2w2rong";
red001.Connect(1000);//开始连接Redis
pingpong = red001.get1s3order("test1", "t1t2wrong");
//pingpong2 =
red001.Get("test1", pingpong2);
std::cout << pingpong << endl;
red001.Get1s3order("test1", pingpong, str0001);
red001.get3order("tes3", pong3, str0001);
std::cout << pingpong << endl;
std::cout << pingpong2 << endl;
std::cout << pong3 << endl;
}
//
std::string tmp_minLen3lines;
red001.get3order("minLen3lines", tmp_minLen3lines, "6.012345");
std::cout << "[第一次,初始化前Redis中的minLen3lines:" << tmp_minLen3lines<< "];";
//
}//110
//模块110(一)-End
//
// 初始化全局字符串
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_MAT01GENARATEDAT19SYS01, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// 执行应用程序初始化:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_MAT01GENARATEDAT19SYS01));
MSG msg;
// 主消息循环:
while (GetMessage(&msg, nullptr, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
//
// 函数: MyRegisterClass()
//
// 目标: 注册窗口类。
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEXW wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAT01GENARATEDAT19SYS01));
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_MAT01GENARATEDAT19SYS01);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassExW(&wcex);
}
//
// 函数: InitInstance(HINSTANCE, int)
//
// 目标: 保存实例句柄并创建主窗口
//
// 注释:
//
// 在此函数中,我们在全局变量中保存实例句柄并
// 创建和显示主程序窗口。
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
hInst = hInstance; // 将实例句柄存储在全局变量中
// HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, 200+lightResX1000, lightResY1000, nullptr, nullptr, hInstance, nullptr);
//CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
//
//画点:
void setpixe01(HDC hdc, int x, int y, COLORREF rgb1) {
SetPixel(hdc, x, Y_high1000 - y, rgb1);// Y_high800 - y, rgb1);
}
//MoveTo:
void move01to(HDC hdc, int x, int y) {
MoveToEx(hdc, x, Y_high1000 - y, NULL);
}
//画线:
void line01to(HDC hdc, int x, int y, COLORREF rgb1) {
LineTo(hdc, x, Y_high1000 - y);
}
template<typename T>
void swapValue(T&var1, T&var2) {
T tmp;
tmp = var1; var1 = var2; var2 = tmp;
}
//画线02为了带颜色:
void line02to(HDC hdc, int x0, int y0, int x, int y, COLORREF rgb1) {
double L = sqrt(squareOf_EuclidDistance(x0, y0, x, y));
if (x0 > x) { //保证 x0在左(先画
// int tmp = x0; x0 = x; x = tmp; tmp = y0; y0 = y; y = tmp;
swapValue(x0, x); swapValue(y0, y);
}
double arc = atan((y - y0) / (x - x0));
for (int i = 0; i < (L + 1); ++i) {
int xx = x0 + cos(arc)*i;
int yy = y0 + sin(arc)*i;
setpixe01(hdc, xx, yy, RGB(255,225,0));
}
}//line02to
//
//void wm01paint01InitiaDiCaErZuobiaoZhou(HDC hdc) {
void wm01paint01descart_cartesianCoordinate(HDC hdc) {//笛卡尔坐标
//Deng氏笛卡尔坐标轴:
move01to(hdc, 100, 1000);
line01to(hdc, 100, 100, RGB(0, 100, 0));
line01to(hdc, 1000, 100, RGB(0, 100, 0));
TextOut(hdc,100, 10, L"x=10,y=100",strlen("x=10,y=100") );
TextOut(hdc, 100, 900, L"x=0,y=0", strlen("x=0,y=0"));
TextOut(hdc, 1000, 900, L"x=100,y=100", strlen("x=100,y=100"));
TextOut(hdc, 1000, 0, L"x=100,y=0", strlen("x=100,y=0"));
TextOut(hdc, 600, 400, L"x=50,y=50", strlen("x=50,y=50"));
line02to(hdc, 1000, 100, 100, 1000, RGB(255, 0, 0));// 100, 0));
move01to(hdc, 100, 100);
line02to(hdc,100,100, 1000, 1000, RGB(250,0,0));
}//wm01paint01InitiaDiCaErZuobiaoZhou
//产生6段椭圆弧数据:
void set_image_draw06Ova01(HDC hdc) {
cou02t.open("f://cout02t190110a1.txt");
//
double rx02rx;//反着用的 缩放比例
double ry02ry;
// rx02rx = ova06[0].viewRY;
int maxi = 0; int maxj = 0;
for (int i = 0; i < 999; ++i) {
// setpixe01(hdc, i, i, RGB(0, 200, 0));
}
pianyi400_X = 250.0;
pianyi400_X = redi001.get3order2d("pianyi_x250", "250");
pianyi400_Y = 300.0;
lightRy_origin_3 = redi001.get3order2d("rightRy_origin3", to_string(lightRy_origin_3));
double rr = lightRy_origin_3;//缩放比例 2.0;
double vx1;
vx1 = xa1 * rr + pianyi400_X;
double vy1;
vy1 = ya1 * rr + pianyi400_Y;
double vx2;
vx2 = (double)xa2 * rr + pianyi400_X;
double vy2;
vy2 = ya2 * rr + pianyi400_Y;
double vx3;
vx3 = (double)xa3 * rr + pianyi400_X;
double vy3;
vy3 = (double)ya3 * rr + pianyi400_Y;
//画(放大后的 3角形三角形
move01to(hdc,(int)vx1, (int)vy1);
line01to(hdc,(int)vx2, (int)vy2, RGB(0, 200, 100));
line01to(hdc, vx3, vy3, RGB(0, 200, 100));
line01to(hdc, vx1, vy1, RGB(0, 200, 100));
for (int kk = 0; kk < 6; ++kk) {//for10kk
for (int i = 0; i < 1000; ++i) { //for20i//871
cou02t << "[i:" << i << "] ";
for (int j = 0; j < 1000; ++j) {//for30j
//
// cou02t<< "[j:" << j << "] ";
if (ova06[kk].edge_in_oval((double)i, (double)j, 5.0)) { //1.0)) {//if440 //注意 此处 i,y == X,Y 为 view视图坐标
setpixe01(hdc, i, j, RGB(200, 0, 0));
// setpixe01(hdc, i, j, RGB( (kk*(256/6)),(kk*50), (kk*25+100 )) );
// 0*大圆,
//1*小圆 出来了
//2 没画出
//3 没画出
//4没画出
//5 没画出
if (5 != kk && 3 != kk) setpixe01(hdc, i, j, RGB(0, 0, 250));
if (4 == kk) setpixe01(hdc, i, j, RGB(0, 200, 0));
// cout << "[run110_" ;
// cout << "[j:" << j << "] ";
image06ova[i][j] = RGB(200, 0, 0);//); // , 200, 0);
}//if440
}//for30j
}//for20i
}//for10kk
//输出
for (int j = 0; j < (1 + maxj); ++j) {
for (int i = 0; i < (1 + maxi); ++i) {
if (0 == GetRValue(image06ova[i][j]) && 0 == GetGValue(image06ova[i][j]) && 0 == GetBValue(image06ova[i][j])) {
; //啥也不做
}
else {
// setpixe01(hdc,i, j, image06ova[i][j]);
}
}
}
//
}//set_image_draw06Ova01
//
double wm01paint0_Calculate_minLengthOf3LinesSegment3All01(double x1, double y1, double x2, double y2, double x3, double y3) {
double L12 = sqrt(squareOf_EuclidDistance(x1, y1, x2, y2));
double L23 = sqrt(squareOf_EuclidDistance(x2, y2, x3, y3));
double L13 = sqrt(squareOf_EuclidDistance(x1, y1, x3, y3));
return (L12 + L23 + L13);
}
//
//
void wm01paint01InitiaEllipse06Param01(HDC hdc) {
cout << "|12Run" << endl;
//
//更新 Ellipse参数:
{ //
// double realLengthof3LinesSegments3All_plus;
redi001.Connect(1000);//开始连接Redis
//
std::string x1s;
std::string x2s, x3s, y1s, y2s, y3s;
redi001.get3order("xy00x1", x1s,"0.0");
redi001.get3order("xy00y1", y1s, to_string(xy00Y1) );
redi001.get3order("xy00x2", x2s, to_string(xy00X2));
redi001.get3order("xy00y2", y2s, to_string(xy00Y2));
redi001.get3order("xy00x3", x3s, to_string(xy00X3));
redi001.get3order("xy00y3", y3s, to_string(xy00Y3));
xa1 = stod(x1s);
ya1 = stod(y1s);
xa2 = stod(x2s);
ya2 = stod(y2s);
xa3 = stod(x3s);
ya3 = stod(y3s);
//
double
minLengthOf3LinesSegments3All = wm01paint0_Calculate_minLengthOf3LinesSegment3All01(xa1, ya1, xa2, ya2, xa3, ya3);
cout << "Wm_Paint0[minLengthOf3LinesSegments3All:" << minLengthOf3LinesSegments3All << "],";
std::string tmp_minLen3lines;
redi001.get3order("minLen3lines", tmp_minLen3lines, "6.012345");
std::cout << "Now:minLen3lines:" << tmp_minLen3lines << "];";
std::string tmp_s_order3linesL6_21plus;
redi001.get3order("order3linesL", tmp_s_order3linesL6_21plus, "6.3333");
order3linesL6_21plus = stod(tmp_s_order3linesL6_21plus);
std::cout << order3linesL6_21plus;
//
double tmp2_doublle = redi001.get3order2d("order3linesL", "6.44444");
order3linesL6_21plus = redi001.get3order2d("order3linesL", "6.44444");
std::cout << "[double:"<<order3linesL6_21plus<<endl;
//
//
pianyi400_X = redi001.get3order2d("pianyi400_X", "400");
pianyi400_Y = redi001.get3order2d("pianyi400_Y", "300");
lightResX_res = redi001.get3order2d("lightX_res", "1000");
lightResY_res = redi001.get3order2d("lightY_res", "1000");
//
double ry = lightResY_res / order3linesL6_21plus;
lightRy_origin160 = ry;
//
//下面给6个椭圆赋值:
L12 = sqrt(squareOf_EuclidDistance(xa1, ya1, xa2, ya2));
L23 = sqrt(squareOf_EuclidDistance(xa2, ya2, xa3, ya3));
L13 = sqrt(squareOf_EuclidDistance(xa1, ya1, xa3, ya3));
double k12;
if (xa1 != xa2) { k12 = (ya1 - ya2) / (xa1 - xa2); }
else k12 = Max9long9doub9;
double k13;
if (xa1 != xa3) { k13 = (ya1 - ya3) / (xa1 - xa3); }
else k13 = Max9long9doub9;
double k23;
if (xa2 != xa3) { k23 = (ya2 - ya3) / (xa2 - xa3); }
else k23 = Max9long9doub9;
//
double b12;
b12 = ya1 - xa1 * k12;
double b13;
b13 = ya1 - xa1 * k13; // 0-0*1.732
double b23;
b23 = ya2 - xa3 * k23;
double b_y2_x2k13 = ya2 - xa2 * k13;
double b_y1_x1k23 = ya1 - xa1 * k23;//
redi001.Set("k12", to_string(k12));
redi001.Set("k13", to_string(k13));
redi001.Set("k23", to_string(k23));
redi001.Set("b12", to_string(b12) );
redi001.Set("b13", to_string(b13));
redi001.Set("b23", to_string(b23));
redi001.Set("b_y2_x2k13", to_string(b_y2_x2k13) );
redi001.Set("b_y1_x1k23", to_string(b_y1_x1k23) );
double bd[][3]= { {0.0 ,0.0,0.0}, {0.0,0.0,0.0}, {0.0,0.0, 0.0} };
{
{
ova06[0].setOvalParam(xa1, ya1, xa2, ya2, realLengthof3LinesSegments3All_plus - L12); //上测 上方短弧
bd[0][0] = k13;
bd[0][1] = b13;
bd[0][2] = 1;
bd[1][0] = k23;
bd[1][1] = b23;
bd[1][2] = 1;
bd[2][0] = 0;
bd[2][1] = ya3;
bd[2][2] = 1;
ova06[0].set_bound(bd); //把bd 放在 Class_Oval类的 double[][] bound 里面
}
{
ova06[1].setOvalParam(xa3, ya3, xa2, ya2, realLengthof3LinesSegments3All_plus - L12 - L13);//右上(长弧线
bd[0][0] = 0;
bd[0][1] = ya1;// ny1;
bd[0][2] = 1;
bd[1][0] = k23;
bd[1][1] = b23;
bd[1][2] = 1; //1是上侧
bd[2][0] = k13;
bd[2][1] = b13;
bd[2][2] = -1; //-1是下侧
ova06[1].set_bound(bd);
}
{
ova06[2].setOvalParam(xa1, ya1, xa3, ya3, realLengthof3LinesSegments3All_plus - L13);//右下(短弧线
bd[0][0] = 0;
bd[0][1] = ya1;// ny1;
bd[0][2] = -1;
bd[1][0] = k23;
bd[1][1] = b23;
bd[1][2] = 1;
bd[2][0] = k13;
bd[2][1] = b_y2_x2k13; // = ya2 - xa2 * k13; ny2 - nx2 * k13;//b22k13
bd[2][2] = -1;
ova06[2].set_bound(bd);
}
{
ova06[3].setOvalParam(xa1, ya1, xa2, ya2, realLengthof3LinesSegments3All_plus - L13 - L23);//下(方 弧线
bd[0][0] = k13;
bd[0][1] = b13;
bd[0][2] = -1;
bd[1][0] = k23;
bd[1][1] = b23;
bd[1][2] = -1;
bd[2][0] = 0;
bd[2][1] = ya1;// ny1;
bd[2][2] = -1;
ova06[3].set_bound(bd);
}
{
ova06[4].setOvalParam(xa3, ya3, xa2, ya2, realLengthof3LinesSegments3All_plus - L23);//左下(短弧线
bd[0][0] = 0;
bd[0][1] = ya1;// ny1;
bd[0][2] = -1;//
bd[1][0] = k23;
bd[1][1] = b_y1_x1k23; //= ya1 - xa1 * k23; //ny1 - nx1 * k23;//b11k23
bd[1][2] = -1;
bd[2][0] = k13;
bd[2][1] = b13;
bd[2][2] = 1;
ova06[4].set_bound(bd);
}
{
ova06[5].setOvalParam(xa1, ya1, xa3, ya3, realLengthof3LinesSegments3All_plus - L12 - L23);//左上(长弧线
bd[0][0] = 0;
bd[0][1] = ya1;// ny1;
bd[0][2] = 1;
bd[1][0] = k23;
bd[1][1] = b23;
bd[1][2] = -1;
bd[2][0] = k13;
bd[2][1] = b13;
bd[2][2] = 1;
ova06[5].set_bound(bd);
}
// lightRy_origin_3 = 3.3;
lightRy_origin_3 = redi001.get3order2d("rightRy_origin3", to_string(lightRy_origin_3) );
//初始化 Ova06的视窗
for (int i = 0; i < 6; ++i) {
ova06[i].setView0Windows01(lightRy_origin_3, lightResX_res,lightResY_res, realLengthof3LinesSegments3All_plus,400,500, (1.0) ); }
//三角形的三边参数:
originEdges[0][0] = k12;//边( edge的名词复数 ); 优势; (悬崖、峭壁的) 边缘; 锋利
originEdges[0][1] = b12;
originEdges[1][0] = k13;
originEdges[1][1] = b13;
originEdges[2][0] = k23;
originEdges[2][1] = b23;
}
set_image_draw06Ova01(hdc);
//
}
}//wm01paint01InitiaEllipse06Param01
//
// 函数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// 目标: 处理主窗口的消息。
//
// WM_COMMAND - 处理应用程序菜单
// WM_PAINT - 绘制主窗口
// WM_DESTROY - 发送退出消息并返回
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
{
int wmId = LOWORD(wParam);
// 分析菜单选择:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
break;
case WM_PAINT:
{//case110
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
// TODO: 在此处添加使用 hdc 的任何绘图代码...
//初始化椭圆参数-从1、Redis,当redis中没有时,则2:从全局变量的初始值…
{
wm01paint01descart_cartesianCoordinate(hdc);
// wm01paint01InitiaDiCaErZuobiaoZhou(hdc);
wm01paint01InitiaEllipse06Param01(hdc);
}
EndPaint(hWnd, &ps);
}//case110
break;
//
case WM_LBUTTONDBLCLK://右键 双击WM_LBUTTONDBLCLK:
{//case110
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
// TODO: 在此处添加使用 hdc 的任何绘图代码...
{
cout << "LbutDBCLK" << endl;
// redi001->set("xy00y3", xy00Y3);
// redi001->set("order3linesL", order3linesL6_21plus);
}
EndPaint(hWnd, &ps);
}//case110
break;
//
case WM_RBUTTONDOWN://右键单击 WM_LBUTTONDBLCLK:
{//case330
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
// TODO: 在此处添加使用 hdc 的任何绘图代码...
{
cout << "Rbutdown" << endl;
double
minLengthOf3LinesSegments3All = wm01paint0_Calculate_minLengthOf3LinesSegment3All01(xa1, ya1, xa2, ya2, xa3, ya3);
cout << "Wm_Paint0[minLengthOf3LinesSegments3All:" << minLengthOf3LinesSegments3All << "],";
std::string tmp_minLen3lines;
redi001.get3order("minLen3lines", tmp_minLen3lines, "6.012345");
std::cout << "Now:minLen3lines:" << tmp_minLen3lines << "];";
redi001.Set("minLen3lines", to_string(minLengthOf3LinesSegments3All) );
// redi001->set("xy00y3", xy00Y3);
// redi001->set("order3linesL", order3linesL6_21plus);
// redi001->set("light_ry", lightRy_origin160);
}
EndPaint(hWnd, &ps);
}//case330
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// “关于”框的消息处理程序。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}
```
- 啥叫DynamicalBilliards动态粒子(动力台球)
- 五大系统-为啥搞那么复杂?
- 内存数据库triangleBilliard19Redis参数190101
- HiRedis在C++Windows下配置编译使用190101
- 三大视图:inputOrigin_计算系统(无理数非视图)_3输出视图190110
- MGDs-Mp系统:数学生成数据(或数据生成)系统-参数修改模块190102
- MGDs的安装攻略190110
- redis+MGDs-Mp系统完整代码之-代码块1-测试Redis连接190110
- c++中longdouble_longlong等能计算的最大、最小值190101
- 充分解耦的MGDs-充分松耦合的数学生成数据系统190111
- MGDs-数据生成系统的(部分)核心代码190114
- mfc190115