// MFCApplication1Dlg.cpp: 实现文件
// 源码由<维云斯QQ群:632726473>提供
#include "pch.h"
#include "framework.h"
#include "MFCApplication1.h"
#include "MFCApplication1Dlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
void Close360(void*);
void CountSound(void*);
void START();
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
LPCTSTR keytoname(int key)
{
LPCTSTR name;
const char key92[1] = { 92 };
switch (key)
{
case 16:name = _T("Shift"); break;
case 17:name = _T("Ctrl"); break;
case 18:name = _T("Alt"); break;
case 48:name = _T("0"); break;
case 49:name = _T("1"); break;
case 50:name = _T("2"); break;
case 51:name = _T("3"); break;
case 52:name = _T("4"); break;
case 53:name = _T("5"); break;
case 54:name = _T("6"); break;
case 55:name = _T("7"); break;
case 56:name = _T("8"); break;
case 57:name = _T("9"); break;
case 65:name = _T("A"); break;
case 66:name = _T("B"); break;
case 67:name = _T("C"); break;
case 68:name = _T("D"); break;
case 69:name = _T("E"); break;
case 70:name = _T("F"); break;
case 71:name = _T("G"); break;
case 72:name = _T("H"); break;
case 73:name = _T("I"); break;
case 74:name = _T("J"); break;
case 75:name = _T("K"); break;
case 76:name = _T("L"); break;
case 77:name = _T("M"); break;
case 78:name = _T("N"); break;
case 79:name = _T("O"); break;
case 80:name = _T("P"); break;
case 81:name = _T("Q"); break;
case 82:name = _T("R"); break;
case 83:name = _T("S"); break;
case 84:name = _T("T"); break;
case 85:name = _T("U"); break;
case 86:name = _T("V"); break;
case 87:name = _T("W"); break;
case 88:name = _T("X"); break;
case 89:name = _T("Y"); break;
case 90:name = _T("Z"); break;
case 112:name = _T("F1"); break;
case 113:name = _T("F2"); break;
case 114:name = _T("F3"); break;
case 115:name = _T("F4"); break;
case 116:name = _T("F5"); break;
case 117:name = _T("F6"); break;
case 118:name = _T("F7"); break;
case 119:name = _T("F8"); break;
case 120:name = _T("F9"); break;
case 121:name = _T("F10"); break;
case 122:name = _T("F11"); break;
case 123:name = _T("F12"); break;
case 13:name = _T("Enter"); break;
case 19:name = _T("Pause"); break;
case 20:name = _T("Caps Lock"); break;
case 144:name = _T("Num Lock"); break;
case 145:name = _T("Scroll Lock"); break;
case 27:name = _T("Esc"); break;
case 33:name = _T("Page Up"); break;
case 34:name = _T("Page Down"); break;
case 36:name = _T("Home"); break;
case 35:name = _T("End"); break;
case 38:name = _T("Up"); break;
case 40:name = _T("Down"); break;
case 37:name = _T("Left"); break;
case 39:name = _T("Right"); break;
case 45:name = _T("Insert"); break;
case 32:name = _T("Space"); break;
case 46:name = _T("Delete"); break;
case 187:name = _T("="); break;
case 186:name = _T(";"); break;
case 188:name = _T(","); break;
case 189:name = _T("-"); break;
case 190:name = _T("."); break;
case 191:name = _T("."); break;
case 192:name = _T("`"); break;
case 219:name = _T("["); break;
case 221:name = _T("]"); break;
case 8:name = _T("Back Space"); break;
case 91:name = _T("Win"); break;
case 9:name = _T("Tab"); break;
default:name = _T(""); break;
}
return name;
}
class h360 {
private:
HWND ID, IDK, IDF;
HANDLE time;
RECT nowRect, oldRect;
MSG CurrMsg;
double rect;
public:
bool state = false, stateL = false;
h360(HWND ID360) :ID(ID360)
{
RECT rect360;
CString aaa;
IDK = FindWindowExA(ID360, FindWindowExA(ID360, NULL, NULL, NULL), NULL, NULL);
IDF = GetAncestor(ID, 3);
GetWindowRect(IDF, &rect360);
oldRect = rect360;
rect = (rect360.right - rect360.left) / 850.0;
}
void Broken()
{
DWORD t = GetTickCount();
HWND ID360 = NULL;
PostMessageA(ID, 516, 2, 425 + 50 * 65536);
PostMessageA(ID, 517, 2, 425 + 50 * 65536);
ID360 = FindWindowExA(NULL, NULL, "#32768", NULL);
while (GetTickCount() - t < 150 && ID360 == NULL)
{
Sleep(1);
ID360 = FindWindowExA(NULL, NULL, "#32768", NULL);
}
PostMessageA(ID360, 517, 2, 0);
if (!state)
{
PostMessageA(ID360, 256, 40, 0);
PostMessageA(ID360, 256, 13, 0);
state = true;
_beginthread(CountSound, 0, NULL);
MessageBeep(MB_OK);
}
else
{
PostMessageA(ID360, 256, 40, 0);
PostMessageA(ID360, 256, 40, 0);
PostMessageA(ID360, 256, 13, 0);
state = false;
MessageBeep(MB_ICONHAND);
}
}
HWND getIDF()
{
return IDF;
}
};
h360 *p360 = NULL;
POINT screen = { ::GetSystemMetrics(0) ,::GetSystemMetrics(1) };
bool foucs = false;
int Key = 18;
HWND hEdit;
void CountSound(void*)
{
DWORD t;
for (int i = 0; (p360 == NULL ? false : p360->state); i++)
{
t = GetTickCount();
MessageBeep(MB_OK);
while (GetTickCount() - t < 985)
{
Sleep(15);
if (!(p360 == NULL ? false : p360->state))
return;
}
}
}
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_ABOUTBOX };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CMFCApplication1Dlg 对话框
CMFCApplication1Dlg::CMFCApplication1Dlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_MFCAPPLICATION1_DIALOG, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CMFCApplication1Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CMFCApplication1Dlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
// ON_EN_CHANGE(IDC_EDIT1, &CMFCApplication1Dlg::OnEnChangeEdit1)
ON_EN_SETFOCUS(IDC_EDIT1, &CMFCApplication1Dlg::OnEnSetfocusEdit1)
ON_EN_KILLFOCUS(IDC_EDIT1, &CMFCApplication1Dlg::OnEnKillfocusEdit1)
END_MESSAGE_MAP()
// CMFCApplication1Dlg 消息处理程序
BOOL CMFCApplication1Dlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// 将“关于...”菜单项添加到系统菜单中。
// IDM_ABOUTBOX 必须在系统命令范围内。
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != nullptr)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// 设置此对话框的图标。 当应用程序主窗口不是对话框时,框架将自动
// 执行此操作
SetIcon(m_hIcon, TRUE); // 设置大图标
SetIcon(m_hIcon, FALSE); // 设置小图标
//ShowWindow(SW_MINIMIZE);
// TODO: 在此添加额外的初始化代码
hEdit = ((CEdit *)GetDlgItem(IDC_EDIT1))->m_hWnd;
((CEdit *)GetDlgItem(IDC_EDIT1))->SetWindowText(_T("Alt"));
START();
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
void CMFCApp
没有合适的资源?快使用搜索试试~ 我知道了~
图形建模源码计算机图形学实验部分代码分享给需要的同学
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共7个文件
yjdw360:1个
netother:1个
netkc:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
需积分: 5 0 下载量 99 浏览量
2024-08-19
15:45:19
上传
评论
收藏 18KB ZIP 举报
温馨提示
一、什么是计算机图形学? 什么是计算机图形学?计算机图形学(Computer Graphics,简称CG)的内容比较丰富,与很多学科都有交叉,因此笔者认为是无法严格定义的。 在“Wiki百科”和“百度百科”上,对“计算机图形学”的解释为:计算机图形学是一种使用数学算法将二维或三维图形转化为计算机显示器的栅格形式的科学。简单地说,计算机图形学的主要研究内容就是研究如何在计算机中表示图形、以及利用计算机进行图形的计算、处理和显示的相关原理与算法。虽然通常认为CG是指三维图形的处理,事实上也包括了二维图形及图像的处理。 狭义地理解,计算机图形学是数字图象处理或计算机视觉的逆过程:计算机图形学是用计算机来画图像的学科,数字图象处理是把外界获得的图象用计算机进行处理的学科,计算机视觉是根据获取的图像来理解和识别其中的物体的三维信息及其他信息。 注意,这些都是不确切的定义,实际上,计算机图形学、数字图象处理和计算机视觉在很多地方的区别不是非常清晰,很多概念是相通的,而且随着研究的深入,这些学科方向不断的交叉融入,形成一个更大的学科方向,可称之为“可视计算”(Visual Computing
资源推荐
资源详情
资源评论
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 7 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/7ec11ac754d345228d32a6ea43f54894_weixin_43860634.jpg!1)
飞翔的佩奇
- 粉丝: 5187
- 资源: 1419
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 微电网(两台)主从控制孤岛-并网平滑切换的分析 分析了: 1.孤岛下VF控制 2.并网下PQ控制 3.孤岛下主从控制 4.孤岛
- 制袋机横切机电脑程序威纶通触摸屏和三菱3UPLC加模拟量4DA模块,控制两台变频器(主机和给料辊筒)和一台送料伺服 通过触摸屏
- C图形化编程简单实现中秋月亮移动的动画
- su27.glb(苏27飞机的glb格式模型)
- 2SK2869-VB一款N-Channel沟道TO252的MOSFET晶体管参数介绍与应用说明
- 溢流阀课件液压压力控制元件溢流阀
- 2SK2869STL-E-VB一款N-Channel沟道TO252的MOSFET晶体管参数介绍与应用说明
- 基于MATLAB的声源定位广义互相关算法的实现源码+全部资料
- 672661498614717漫客栈HD.apk
- MobaXterm-Portable-v22.0.7z
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)