📄 testdlg.h
字号:
// TestDlg.h : header file
//
#if !defined(AFX_TESTDLG_H__CD05C273_18C7_410B_A57F_9860E9450A16__INCLUDED_)
#define AFX_TESTDLG_H__CD05C273_18C7_410B_A57F_9860E9450A16__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog
//Emgs3D不规则三维数据体的文件头格式
typedef struct
{
BYTE btMark[4]; //文件标识,为"EA3D"
int nCols;
int nRows;
int nSampleCount;
double dbCoordX1; //三个端点为按逆时针方向的三个点,
double dbCoordY1; //第四个端点可由此三个端点坐标计算出
double dbCoordX2;
double dbCoordY2;
double dbCoordX3;
double dbCoordY3;
double dbMinZ;
double dbMaxZ; //dz一般为负值,
double dbMinValue;
double dbMaxValue;
} EA3DDATAFILEHEADER;
#include "Group.h"
#include "Trace.h"
struct C3DPoint
{
double x;
double y;
double z;
};
#include "LayerArray.h"
#include "WellFileArray.h"
typedef CGroup<C3DPoint> CC3DPointGroup;
#include "ButtonST.h"
class CTestDlg : public CDialog
{
public:
BOOL m_bRead;
public:
double m_dbMaxX;
double m_dbMinX;
double m_dbMaxY;
double m_dbMinY;
double m_dbMaxZ;
double m_dbMinZ;
double m_dbDeltaX; //x方向步长
double m_dbDeltaY; //y向步长
double m_dbDeltaZ; //z向步长
double m_dbDeltaLayerZ;
double m_dbMaxV;
double m_dbMinV;
double m_dbLengthZ;
public:
CC3DPointGroup m_DemGroup; //文件高程离散数据
CC3DPointGroup m_DemFullGroup; //插值后的高程数据
CLayerArray m_LayerArray;
CGLVertexGroup m_3DOGroup; //三维离散数据
CGLVertexGroup m_3DVGroup; //3dv
CStringArray m_strArrayStep;
public:
CWellFileArray m_wellFileArray;//井文件数组
CStringArray m_strProArray; //存放物性
CString m_strCurrentPro;
int m_nScale;
public:
CString GetFileExtName(CString strFileName);
CString GetParentPath(CString strPath);
void Clear();
BOOL OpenDemFile(CString strFileName);
BOOL OpenD3doFile(CString strFileName);
void StatisticMaxMin();
void InvDistancePower();
double GetZ(double dbX,double dbY);
BOOL SaveDem();
void DivLayer();
void GetGripPos(double x,double y,int &nColIndex,int &nRowIndex);
BOOL CorrentLayerArray();
int GetPointLieLayer(int nColIndex,int nRowIndex,double z);
double GetValue(double x,double y,double z,int nLayerIndex);
BOOL Save3dv();
void GetValueMaxMin();
void Init3dGroup();
void Trans3DV();
CString GetFileMainName(CString strFileName);
CString GetFileCoreName(CString strFileName);
BOOL GetBrowserPath(CWnd* pwndOwner,CString& strPath,CString strTitle);
void DisableModeOne(BOOL b);
void DisableModeTwo(BOOL b);
void DivXYGrid();
public:
int EnumFolderSubFolder(CString strFolder,CStringArray& strArray);
int EnumFolderFile(CString strFolder,CStringArray& strArray);
BOOL FileExists(CString strFileName);
void SearchPro();
BOOL PropExist(CString strPro);
void Make3do();
BOOL StepExist(double dbStep);
int GetXYLayer(CLayer *pLayer,double x,double y);
void InitImageFileHeader(EA3DDATAFILEHEADER *header);
public:
void SetControlSize();
public:
void *alloc1 (size_t n1, size_t size);
double *alloc1double(size_t n1);
void free1(void *p);
void free1double(double *p);
// Construction
public:
CTestDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTestDlg)
enum { IDD = IDD_TEST_DIALOG };
CEdit m_editXyGrid2;
CStatic m_staticXY2;
CEdit m_editSave3dvFileName;
CStatic m_staticSave3dvFileName;
CEdit m_editSave3doFileName;
CStatic m_staticSave3doFileName;
CButtonST m_buttonSave3do;
CEdit m_editSave3do;
CStatic m_staticSave3doFile;
CEdit m_editConeffZ;
CEdit m_editConeffY;
CEdit m_editConeffX;
CStatic m_staticConeffZ;
CStatic m_staticConeffY;
CStatic m_staticConeffX;
CEdit m_editXyGrid;
CEdit m_editLayer;
CEdit m_editSamples;
CEdit m_editRows;
CEdit m_editCols;
CStatic m_staticXY;
CStatic m_staticZL;
CStatic m_staticZS;
CStatic m_staticYS;
CStatic m_staticXS;
CStatic m_staticdemfile;
CStatic m_static3dofile;
CButtonST m_button3DO;
CButtonST m_button3DV;
CButtonST m_buttonOpenDem;
CEdit m_edit3dvfile;
CEdit m_editdemfile;
CEdit m_edit3dofile;
CStatic m_static3dvfile;
CButton m_staticProSet;
CButton m_staticFilePath;
CButton m_staticGridSet;
CButton m_buttonCancel;
CButtonST m_buttonMake3dv;
CButtonST m_buttonMake3do;
CComboBox m_comboxResetStep;
CStatic m_staticSampleStep;
CComboBox m_comboxSample;
CButton m_staticSampleSheet;
CComboBox m_comboxBoxPro;
CButton m_staticProSheet;
CButtonST m_buttonAreaFile;
CEdit m_editAreaDir;
CButtonST m_buttonAreaDir;
CStatic m_staticAreaDir;
CButtonST m_buttonReadFile;
CEdit m_editOrgDir;
CButtonST m_buttonOrgDir;
CStatic m_staticOrgDir;
CButton m_BrowserBox;
CButton m_ModeTwoBox;
CButton m_ModeOneBox;
CButton m_RadioModeTwo;
CButton m_RadioModeOne;
CButton m_Ctrl3DVBox;
CButton m_Ctrl3DOBox;
int m_nCols;
int m_nRows;
int m_nSamples;
int m_nLayers;
CString m_strFileName;
CString m_strFileDem;
CString m_str3DVFile;
int m_nModeOne;
int m_nModeTwo;
CString m_strOrgFileDir;
CString m_str3doDir;
CString m_str3doFileName;
double m_dbConeffY;
double m_dbConeffZ;
double m_dbConeffX;
CString m_strSave3dvFileName;
int m_nGridX;
int m_nGridY;
CString m_strAreaPath;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButtonOpen();
afx_msg void OnOk();
afx_msg void OnButtonDem();
afx_msg void OnButton3dv();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnRadioModeOne();
afx_msg void OnRadioModeTwo();
afx_msg void OnButtonReadFile();
afx_msg void OnButtonOrgDir();
afx_msg void OnCloseupComboProSheet();
afx_msg void OnCloseupComboResetStep();
afx_msg void OnButtonMake3do();
afx_msg void OnButtonSave3do();
afx_msg void OnButtonAreaDir();
afx_msg void OnButtonAreaFile();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTDLG_H__CD05C273_18C7_410B_A57F_9860E9450A16__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -