Index: src/ictranslate/ICTranslateDlg.cpp =================================================================== diff -u -r454505cd84bed489de72fb95d514be8834388ff8 -ra7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30 --- src/ictranslate/ICTranslateDlg.cpp (.../ICTranslateDlg.cpp) (revision 454505cd84bed489de72fb95d514be8834388ff8) +++ src/ictranslate/ICTranslateDlg.cpp (.../ICTranslateDlg.cpp) (revision a7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30) @@ -66,8 +66,8 @@ CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_SRCDATA_LIST, m_ctlBaseLanguageList); DDX_Control(pDX, IDC_DSTDATA_LIST, m_ctlCustomLanguageList); - DDX_Control(pDX, IDC_SRCDATA_EDIT, m_ctlSrcText); - DDX_Control(pDX, IDC_DSTDATA_EDIT, m_ctlDstText); + DDX_Control(pDX, IDC_SRCDATA_RICHEDIT, m_ctlSrcText); + DDX_Control(pDX, IDC_DSTDATA_RICHEDIT, m_ctlDstText); DDX_Control(pDX, IDC_SRC_FILENAME_EDIT, m_ctlSrcFilename); DDX_Control(pDX, IDC_SRC_AUTHOR_EDIT, m_ctlSrcAuthor); DDX_Control(pDX, IDC_SRC_LANGUAGE_NAME_EDIT, m_ctlSrcLanguageName); Index: src/ictranslate/ICTranslateDlg.h =================================================================== diff -u -r454505cd84bed489de72fb95d514be8834388ff8 -ra7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30 --- src/ictranslate/ICTranslateDlg.h (.../ICTranslateDlg.h) (revision 454505cd84bed489de72fb95d514be8834388ff8) +++ src/ictranslate/ICTranslateDlg.h (.../ICTranslateDlg.h) (revision a7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30) @@ -16,10 +16,36 @@ // Dialog Data enum { IDD = IDD_ICTRANSLATE_DIALOG }; - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL PreTranslateMessage(MSG* pMsg); + afx_msg void OnFileOpenBaseTranslation(); + afx_msg void OnFileOpenYourTranslation(); + afx_msg void OnItemChangedSrcDataList(NMHDR *pNMHDR, LRESULT *pResult); + afx_msg void OnItemChangedDstDataList(NMHDR *pNMHDR, LRESULT *pResult); + afx_msg void OnBnClickedCopyButton(); + afx_msg void OnBnClickedApply(); + afx_msg void OnEnKillFocusDstAuthorEdit(); + afx_msg void OnEnKillFocusDstLanguageNameEdit(); + afx_msg void OnEnKillFocusDstHelpFilenameEdit(); + afx_msg void OnBnClickedDstRtlCheck(); + afx_msg void OnEditPreviousToTranslate(); + afx_msg void OnEditNextToTranslate(); + afx_msg void OnEditApplyChange(); + afx_msg void OnEditApplyAndNext(); + afx_msg void OnBnClickedChooseFontButton(); + afx_msg void OnEditCleanupTranslation(); + afx_msg void OnFileNewTranslation(); + afx_msg void OnFileSaveTranslationAs(); + afx_msg void OnFileSaveTranslation(); protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnInitDialog(); + virtual void OnCancel(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + DECLARE_MESSAGE_MAP() + static void EnumLngStrings(uint_t uiID, const ictranslate::CTranslationItem* pTranslationItem, ptr_t pData); void UpdateBaseLanguageList(); @@ -41,23 +67,11 @@ HACCEL m_hAccel; - // Generated message map functions - virtual BOOL OnInitDialog(); - afx_msg void OnSysCommand(UINT nID, LPARAM lParam); - afx_msg void OnPaint(); - afx_msg HCURSOR OnQueryDragIcon(); - DECLARE_MESSAGE_MAP() + // Controls CListCtrl m_ctlBaseLanguageList; CListCtrl m_ctlCustomLanguageList; -public: - CEdit m_ctlSrcText; - CEdit m_ctlDstText; - afx_msg void OnFileOpenBaseTranslation(); - afx_msg void OnFileOpenYourTranslation(); - afx_msg void OnItemChangedSrcDataList(NMHDR *pNMHDR, LRESULT *pResult); - afx_msg void OnItemChangedDstDataList(NMHDR *pNMHDR, LRESULT *pResult); - afx_msg void OnBnClickedCopyButton(); - afx_msg void OnBnClickedApply(); + CRichEditCtrl m_ctlSrcText; + CRichEditCtrl m_ctlDstText; CEdit m_ctlSrcFilename; CEdit m_ctlSrcAuthor; CEdit m_ctlSrcLanguageName; @@ -70,21 +84,4 @@ CEdit m_ctlDstHelpFilename; CEdit m_ctlDstFont; CButton m_ctlDstRTL; - afx_msg void OnBnClickedChooseFontButton(); - afx_msg void OnEditCleanupTranslation(); - afx_msg void OnFileNewTranslation(); - afx_msg void OnFileSaveTranslationAs(); - afx_msg void OnFileSaveTranslation(); -protected: - virtual void OnCancel(); -public: - afx_msg void OnEnKillFocusDstAuthorEdit(); - afx_msg void OnEnKillFocusDstLanguageNameEdit(); - afx_msg void OnEnKillFocusDstHelpFilenameEdit(); - afx_msg void OnBnClickedDstRtlCheck(); - afx_msg void OnEditPreviousToTranslate(); - afx_msg void OnEditNextToTranslate(); - afx_msg void OnEditApplyChange(); - afx_msg void OnEditApplyAndNext(); - virtual BOOL PreTranslateMessage(MSG* pMsg); }; Index: src/ictranslate/ictranslate.cpp =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -ra7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30 --- src/ictranslate/ictranslate.cpp (.../ictranslate.cpp) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/ictranslate/ictranslate.cpp (.../ictranslate.cpp) (revision a7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30) @@ -44,7 +44,8 @@ // in your application. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); - + + AfxInitRichEdit2(); CWinApp::InitInstance(); AfxEnableControlContainer(); @@ -56,7 +57,7 @@ // Change the registry key under which our settings are stored // TODO: You should modify this string to be something appropriate // such as the name of your company or organization - SetRegistryKey(_T("Local AppWizard-Generated Applications")); +// SetRegistryKey(_T("Local AppWizard-Generated Applications")); CICTranslateDlg dlg; m_pMainWnd = &dlg; Index: src/ictranslate/ictranslate.rc =================================================================== diff -u -r454505cd84bed489de72fb95d514be8834388ff8 -ra7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30 --- src/ictranslate/ictranslate.rc (.../ictranslate.rc) (revision 454505cd84bed489de72fb95d514be8834388ff8) +++ src/ictranslate/ictranslate.rc (.../ictranslate.rc) (revision a7d20eee5bbbb94fe52b2cea4a0e55338ebb9d30) @@ -171,9 +171,7 @@ CONTROL "Right-to-left reading order",IDC_DST_RTL_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,277,84,263,10 CONTROL "",IDC_SRCDATA_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,114,263,151 CONTROL "",IDC_DSTDATA_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,277,114,263,151 - EDITTEXT IDC_SRCDATA_EDIT,7,267,255,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&>\n>",IDC_COPY_BUTTON,267,271,15,37,BS_MULTILINE - EDITTEXT IDC_DSTDATA_EDIT,285,267,255,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Apply change",IDAPPLY,471,314,69,14 LTEXT "Base translation:",IDC_STATIC,7,104,262,8 LTEXT "Your translation:",IDC_STATIC,277,104,263,8 @@ -187,6 +185,8 @@ LTEXT "Language name:",IDC_STATIC,277,40,58,8 LTEXT "Font:",IDC_STATIC,277,70,58,8 LTEXT "Help file name:",IDC_STATIC,277,55,58,8 + CONTROL "",IDC_SRCDATA_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,7,266,257,62 + CONTROL "",IDC_DSTDATA_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,286,267,254,44 END