?? stylebar.h
字號:
#if !defined(AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_)
#define AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// StyleBar.h : header file
//
#include"Resource.h"
/////////////////////////////////////////////////////////////////////////////
// CMTextStyleBar command target
#include <afxtempl.h>
#include <afxcoll.h>
#include "MTextStyleBox.h"
#include "MTextColorBox.h"
#include "IcadFontComboBox.h"
#include "..\..\LIB\ICADLIB\Icadlib.h" // Added by ClassView
class CMTextStyleBar : public CToolBar
{
// Attributes
public:
// void OnCharBold();
// Operations
public:
void UpdateStyle();
BOOL init(SDS_mTextData* pMTextData);
COLORREF GetColor(CString &wszColor);
void IniFont();
// void OnCharUnderline();
// void OnCharItalic();
static int CALLBACK EnumFontNameProc (ENUMLOGFONT* lpelf,
NEWTEXTMETRIC* lpntm, int nFontType, LPARAM lParam);
BOOL isBoldUp;
BOOL isUnderlineUp;
BOOL isItalicUp;
BOOL isFoucsInComBoxSize;
BOOL isComBoxSizeDropDown;
LONG m_begin,m_end;
int m_iColorIndex;
double m_FontSizeScale;//字體的縮放比例
virtual void OnUpdateCmdUI(CFrameWnd*pTarget,BOOL bDisableIfNoHndler);
int GetTextHeightFromTwips(sds_real& textHeight, long twipsHeight);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMTextStyleBar)
//}}AFX_VIRTUAL
// Implementation
protected:
public:
void LoadColorString();
static int BOUND_SDS_RGBFromACADColor(int colorindex);
int RGBColorToACAD(COLORREF color);
BOOL IsInFontMap(CString&strFontNameCAD,CString&strFontNameTTF,BOOL needTTF=TRUE);
BOOL UpdateColorBox(int colorindex);
void InitTypefaceList (CDC* pDC);
CFont m_font;
CIcadFontComboBox m_wndFontNames;
CComboBox m_wndFontSizes;
CMTextColorBox m_wndColor;
CMTextStyleBox m_wndFontStyle;
// CMap<int,int,ENUMLOGFONT,ENUMLOGFONT>m_FontMap;
CMap<LONG,LONG,LONG,LONG>m_BoxTwipToEditTwip;
// Generated message map functions
//{{AFX_MSG(CMTextStyleBar)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
//}}AFX_MSG
afx_msg void OnSelectFont ();
afx_msg BOOL OnSelectSize ();
afx_msg void OnSelectColor();
afx_msg void OnSelectStyle();
afx_msg void OnCloseUp();
afx_msg void OnSetFocusComboSize();
afx_msg void OnKillFocusComboSize();
afx_msg void OnDropdownComboSize();
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -