• 大小: 47.02MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: 其他
  • 标签:

资源简介

分享2维,VC对椭圆自由旋转。解决旋转的难题,可围绕一个中心点自由旋转。

资源截图

代码片段和文件信息

// Rotation.cpp : 定义应用程序的类行为。
//

#include “stdafx.h“
#include “Rotation.h“
#include “RotationDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CRotationApp

BEGIN_MESSAGE_MAP(CRotationApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CRotationApp 构造

CRotationApp::CRotationApp()
: m_pTr(0)
{
// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CRotationApp 对象

CRotationApp theApp;


// CRotationApp 初始化

BOOL CRotationApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();

AfxEnableControlContainer();

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
SetRegistryKey(_T(“应用程序向导生成的本地应用程序“));


GdiplusStartupInput m_startupInput;
GdiplusStartup(&m_pTr&m_startupInputNULL);

CRotationDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此处放置处理何时用“确定”来关闭
//  对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用“取消”来关闭
//  对话框的代码
}

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
//  而不是启动应用程序的消息泵。
return FALSE;
}

int CRotationApp::ExitInstance()
{
// TODO: 在此添加专用代码和/或调用基类
GdiplusShutdown(m_pTr);
return CWinApp::ExitInstance();
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-01-06 15:22  椭圆旋转源码\
     目录           0  2017-01-06 15:24  椭圆旋转源码\椭圆旋转\
     目录           0  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Backup\
     文件         880  2012-05-03 10:09  椭圆旋转源码\椭圆旋转\Backup\Rotation.sln
     文件       15360  2012-05-03 20:14  椭圆旋转源码\椭圆旋转\Backup\Rotation.v12.suo
     文件        9730  2012-05-03 10:01  椭圆旋转源码\椭圆旋转\card1.png
     目录           0  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\
     文件      128512  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.exe
     文件     1166608  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.ilk
     文件        2659  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.log
     文件       28810  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.obj
     文件    26935296  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.pch
     文件     4959232  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.pdb
     文件       23200  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.res
     目录           0  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\
     文件        1920  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\cl.command.1.tlog
     文件       43020  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\CL.read.1.tlog
     文件        1122  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\CL.write.1.tlog
     文件        1376  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\link.command.1.tlog
     文件        5294  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\link.read.1.tlog
     文件         560  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\link.write.1.tlog
     文件         544  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\rc.command.1.tlog
     文件        2586  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\rc.read.1.tlog
     文件         150  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\rc.write.1.tlog
     文件         181  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\Rotation.tlog\Rotation.lastbuildstate
     文件       68281  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\RotationDlg.obj
     文件      748872  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\stdafx.obj
     文件     1428480  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\vc120.idb
     文件     3723264  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\Debug\vc120.pdb
     目录           0  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\ipch\
     目录           0  2017-01-06 15:23  椭圆旋转源码\椭圆旋转\ipch\rotation-8384250c\
............此处省略23个文件信息

评论

共有 条评论

相关资源