Fixed unsafe function
This commit is contained in:
106
Dialogs.rc
106
Dialogs.rc
@@ -1,91 +1,43 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Generated by ResEdit 1.6.6
|
||||||
//
|
// Copyright (C) 2006-2015
|
||||||
|
// http://www.resedit.net
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <richedit.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Bitmap resources
|
||||||
//
|
//
|
||||||
#include "windows.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.S.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"#include ""windows.h""\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (Canada) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Icon
|
|
||||||
//
|
|
||||||
|
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
|
||||||
// remains consistent on all systems.
|
|
||||||
IDI_ICON1 ICON "icon1.ico"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Bitmap
|
|
||||||
//
|
|
||||||
|
|
||||||
IDB_BITMAP1 BITMAP "Parts.bmp"
|
IDB_BITMAP1 BITMAP "Parts.bmp"
|
||||||
#endif // English (Canada) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
// Dialog resources
|
||||||
//
|
//
|
||||||
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
IDD_DIALOG1 DIALOG 0, 0, 295, 43
|
||||||
|
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
||||||
|
EXSTYLE WS_EX_WINDOWEDGE
|
||||||
|
CAPTION "Insert Object"
|
||||||
|
FONT 8, "Ms Shell Dlg"
|
||||||
|
{
|
||||||
|
EDITTEXT IDE_EDIT, 35, 6, 195, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
||||||
|
LTEXT "Class:", 0, 10, 9, 20, 9, SS_LEFT, WS_EX_LEFT
|
||||||
|
PUSHBUTTON "Cancel", IDCANCEL, 237, 24, 50, 14, 0, WS_EX_LEFT
|
||||||
|
DEFPUSHBUTTON "OK", IDOK, 237, 6, 50, 14, 0, WS_EX_LEFT
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Icon resources
|
||||||
|
//
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||||
|
IDI_ICON1 ICON "icon1.ico"
|
||||||
|
|||||||
@@ -498,13 +498,14 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
|||||||
ss.ignore();
|
ss.ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(vect.size() != 3)
|
//if(vect.size() != 3)
|
||||||
{
|
//{
|
||||||
sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
//sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
||||||
LPCSTR str = LPCSTR(pto);
|
//LPCSTR str = LPCSTR(pto);
|
||||||
item->lpCurValue = (LPARAM)str;
|
//item->lpCurValue = (LPARAM)str;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
|
if(vect.size() == 3)
|
||||||
{
|
{
|
||||||
Vector3 pos(vect.at(0),vect.at(1),vect.at(2));
|
Vector3 pos(vect.at(0),vect.at(1),vect.at(2));
|
||||||
setPosition(pos);
|
setPosition(pos);
|
||||||
@@ -526,13 +527,14 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
|||||||
ss.ignore();
|
ss.ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(vect.size() != 3)
|
/*if(vect.size() != 3)
|
||||||
{
|
{
|
||||||
sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
||||||
LPCSTR str = LPCSTR(pto);
|
LPCSTR str = LPCSTR(pto);
|
||||||
item->lpCurValue = (LPARAM)str;
|
item->lpCurValue = (LPARAM)str;
|
||||||
}
|
}
|
||||||
else
|
else*/
|
||||||
|
if(vect.size() == 3)
|
||||||
{
|
{
|
||||||
Vector3 size(vect.at(0),vect.at(1),vect.at(2));
|
Vector3 size(vect.at(0),vect.at(1),vect.at(2));
|
||||||
setSize(size);
|
setSize(size);
|
||||||
@@ -555,7 +557,7 @@ std::vector<PROPGRIDITEM> PartInstance::getProperties()
|
|||||||
PIT_COLOR
|
PIT_COLOR
|
||||||
));
|
));
|
||||||
|
|
||||||
sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z);
|
sprintf_s(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z);
|
||||||
properties.push_back(createPGI(
|
properties.push_back(createPGI(
|
||||||
"Item",
|
"Item",
|
||||||
"Offset",
|
"Offset",
|
||||||
@@ -563,7 +565,7 @@ std::vector<PROPGRIDITEM> PartInstance::getProperties()
|
|||||||
(LPARAM)pto,
|
(LPARAM)pto,
|
||||||
PIT_EDIT
|
PIT_EDIT
|
||||||
));
|
));
|
||||||
sprintf(pto2, "%g, %g, %g", size.x, size.y, size.z);
|
sprintf_s(pto2, "%g, %g, %g", size.x, size.y, size.z);
|
||||||
properties.push_back(createPGI(
|
properties.push_back(createPGI(
|
||||||
"Item",
|
"Item",
|
||||||
"Size",
|
"Size",
|
||||||
|
|||||||
21
resource.h
21
resource.h
@@ -1,18 +1,7 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
#define IDC_PROPERTYGRID 2000
|
||||||
// Microsoft Visual C++ generated include file.
|
#define IDC_STATIC 2
|
||||||
// Used by Dialogs.rc
|
|
||||||
//
|
#define IDE_EDIT 105
|
||||||
#define IDI_ICON1 102
|
#define IDI_ICON1 102
|
||||||
#define IDB_BITMAP1 103
|
#define IDB_BITMAP1 103
|
||||||
#define IDC_PROPERTYGRID 2000
|
#define IDD_DIALOG1 104
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|||||||
Reference in New Issue
Block a user