Преглед изворни кода

use the latest rich text box, Fixed issue that would cause em-dashes to be replaced with regular dashes

Scott Brogden пре 8 година
родитељ
комит
b5b2bd0e40
3 измењених фајлова са 7 додато и 10 уклоњено
  1. 3 3
      CP_Main.cpp
  2. 3 6
      RichEditCtrlEx.cpp
  3. 1 1
      RulerRichEditCtrl/RulerRichEdit.cpp

+ 3 - 3
CP_Main.cpp

@@ -135,9 +135,7 @@ CCP_MainApp::~CCP_MainApp()
 }
 
 BOOL CCP_MainApp::InitInstance()
-{
-	LoadLibrary(TEXT("riched20.dll"));
-
+{	
 	AfxEnableControlContainer();
 	AfxOleInit();
 	AfxInitRichEditEx();
@@ -146,6 +144,8 @@ BOOL CCP_MainApp::InitInstance()
 	Gdiplus::GdiplusStartupInput gdiplusStartupInput;
 	Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
 
+	LoadLibrary(TEXT("MSFTEDIT.DLL"));
+
 	//MessageBox(NULL, _T("ditto starting"), _T("d"), MB_OK);
 
 	DittoCommandLineInfo cmdInfo;

+ 3 - 6
RichEditCtrlEx.cpp

@@ -28,7 +28,7 @@ BOOL PASCAL AfxInitRichEditEx()
     if( l_pState->m_hInstRichEdit20 == NULL )
     {
 #ifdef _UNICODE 
-        l_pState->m_hInstRichEdit20 = LoadLibraryW(_T("RICHED20.DLL"));
+        l_pState->m_hInstRichEdit20 = LoadLibraryW(_T("MSFTEDIT.DLL"));
 #else
 		l_pState->m_hInstRichEdit20 = LoadLibraryA(_T("RICHED20.DLL"));
 #endif
@@ -534,9 +534,6 @@ int CRichEditCtrlEx::OnCreate(LPCREATESTRUCT lpCreateStruct)
 
 BOOL CRichEditCtrlEx::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
 {
-#ifdef _UNICODE
-	return CWnd::Create(_T("RichEdit20W"), lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
-#else
-	return CWnd::Create(_T("RichEdit20A"), lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
-#endif
+	return CWnd::Create(_T("RichEdit50W"), lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
+
 }

+ 1 - 1
RulerRichEditCtrl/RulerRichEdit.cpp

@@ -95,7 +95,7 @@ BOOL CRulerRichEdit::Create( DWORD style, CRect rect, CWnd* parent )
    ============================================================*/
 {
 
-	return CWnd::Create (RTF_CLASS, NULL, style, rect, parent, RTF_CONTROL );
+	return CWnd::Create (L"RICHEDIT50W", NULL, style, rect, parent, RTF_CONTROL );
 
 };