?? mtextdlg.h
字號:
#if !defined(AFX_MTEXTDLG_H__709470C1_AB10_4781_ACC8_6EF0F134F498__INCLUDED_)
#define AFX_MTEXTDLG_H__709470C1_AB10_4781_ACC8_6EF0F134F498__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MtextDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMTextDlg dialog
#include "NewMText.h"
#include "StyleBar.h"
#include "Richole.h"
#include "Stack.h"
#include <afxole.h>
#include "..\..\LIB\ICADLIB\Icadlib.h" // Added by ClassView
#define Max_FontSizeScale 8.0
#define Min_FontSizeScale (8.0/3.0)
#define NO_CHANGE_MAX 1000
#define Min_FontTwips 150
#define Mid_FontTwips 400
#define Max_FontTwips 3200 //用于字體比例
#define PRINTINFO_LINE_PRE \
CString _strLINE_;
#define PRINTINFO_LINE \
_strLINE_.Format("%d",__LINE__);\
AfxMessageBox(_strLINE_);
#define COLOR_FOR_LAYER_PLUS (RGB(255,255,255)-1)
#define COLOR_FOR_BLOCK_PLUS (RGB(255,255,255)-2)
//class CMTextDlg;
class CMTextDlg : public CDialog
{
// Construction
public:
BOOL SetPreciseMTextFraments();
void SetCadFontToTrueTypeMap();
BOOL SetStackObject(LONG index,CMTextStack &stackobj);
BOOL GetStackObject(LONG index,CMTextStack &stackobj);
BOOL UpdateStackCF(LONG index,CHARFORMAT cf);
BOOL IsStackInSelectRange(LONG index,CHARRANGE cr);
BOOL UpdateStackOnChange(CHARFORMAT cf);
void SetStackAlign(BOOL forCAD);
BOOL SetLineLength(double length);
BOOL ParseLineIdentToCADStr();
void SetWindowPlace();
BOOL MakeStack(float fScale=1.0);
BOOL ConvertMTextStrToCADStr();
BOOL SetStackSelected(LONG index);
BOOL AllStackToCADString();
BOOL AllCADStringToStack();
BOOL Init(SDS_mTextData *dataPtr);
BOOL needCreation();
CMTextDlg(UINT nIDCaption, SDS_mTextData* dataPtr, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
static void ConvertTextHeightToTwips(sds_real realHeight, long& twipsHeight);
static void ConvertTwipsToTextHeight(sds_real& realHeight, long twipsHeight);
BOOL SetStackObject(CMTextStack&stackobj);
BOOL GetStackObject(CMTextStack&stackobj);
BOOL UnMakeStack();
BOOL IsSelectStack();
BOOL CreateFromClipboard();
~CMTextDlg();
BOOL InsertObject();
BOOL CreateFromFile(LPCTSTR lpszFileName);
void GetAlignment(int &nAlignment);
void SetTransparent(BOOL type,int degree);
BOOL m_HaveChangeSize;
CMTextDlg(CWnd* pParent = NULL); // standard constructor
CRect m_ChangeSize;
CMTextStyleBar m_wndStyleBar;
BOOL m_bIsTransparent;
////////////////////////////////////////////////////
LPRICHEDITOLE m_pRichEditOle;
LPOLEOBJECT m_lpObject;
LPSTORAGE m_lpStorage;
LPOLECLIENTSITE m_lpClientSite;
IDataObject * m_pDataObject;
LONG m_CurrentSelStackIndex;
////////////////////////////////////////////////////
SDS_mTextData* m_pMTextData;
CString m_text;
int m_iTextAlign;
BOOL m_bIsOK;
CString m_strLineIdent;
CDC m_dcTarget;
double m_dBoxWidth;//行寬度;
double m_dLineSpace;
int m_iLineSpaceStyle;
int m_iStackAlign;
BOOL m_bIsOnInitial;
int m_color;
////////////////////////////////////////////////////
// Dialog Data
//{{AFX_DATA(CMtextDlg)
enum { IDD = IDD_DIALOG_MText };
CMTextRichEditCtrl m_ctlRichText;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMTextDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CMTextDlg)
afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
afx_msg void OnSize(UINT nType, int cx, int cy);
virtual BOOL OnInitDialog();
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
afx_msg void OnCharBold();
afx_msg void OnCharItalic();
afx_msg void OnCharUnderline();
afx_msg void OnUpdateCharBold(CCmdUI* pCmdUI);
afx_msg void OnUpdateCharItalic(CCmdUI* pCmdUI);
afx_msg void OnUpdateCharUnderline(CCmdUI* pCmdUI);
afx_msg void OnEditUndo();
afx_msg void OnEditRedo();
afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnEditAutoUPCASE();
afx_msg void OnEditCut();
afx_msg void OnEditCOPY();
afx_msg void OnEditDegree();
afx_msg void OnEditDelFormat();
afx_msg void OnEditDiameter();
afx_msg void OnEditFindR();
afx_msg void OnEditOther();
afx_msg void OnEditPast();
afx_msg void OnEditPlus();
afx_msg void OnEditPutWord();
afx_msg void OnEditSelectALL();
afx_msg void OnEditTable();
afx_msg void OnEditBlackSpace();
afx_msg void OnEditCombineP();
afx_msg void OnEditAlignL();
afx_msg void OnEditAlignC();
afx_msg void OnEditAlignR();
afx_msg void OnEditAlignL_C();
afx_msg void OnEditAlignC_C();
afx_msg void OnEditAlignR_C();
afx_msg void OnEditAlignL_D();
afx_msg void OnEditAlignC_D();
afx_msg void OnEditAlignR_D();
afx_msg void OnEditChangeLOWCASE();
afx_msg void OnEditChangeUPCASE();
afx_msg void OnStack();
afx_msg void OnUpdateStack(CCmdUI* pCmdUI);
afx_msg void OnStackStyle();
afx_msg void OnOkButton();
afx_msg void OnDestroy();
afx_msg void OnTransparent();
//}}AFX_MSG
afx_msg void OnMTextWithSet();
afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam);
afx_msg BOOL OnToolTipText(UINT nID, NMHDR* pNMHDR, LRESULT* pResult);
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MTEXTDLG_H__709470C1_AB10_4781_ACC8_6EF0F134F498__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -