diff -Nur source/StatusCtrl.cpp source.patch/StatusCtrl.cpp
old
|
new
|
|
47 | 47 | { |
48 | 48 | } |
49 | 49 | |
50 | | |
51 | 50 | BEGIN_MESSAGE_MAP(CStatusCtrl, CRichEditCtrl) |
52 | 51 | //{{AFX_MSG_MAP(CStatusCtrl) |
53 | 52 | ON_WM_ERASEBKGND() |
… |
… |
|
184 | 183 | Copy(); |
185 | 184 | } |
186 | 185 | |
187 | | /* Unused Unicode code |
| 186 | /* Unused Unicode code*/ |
188 | 187 | BOOL CStatusCtrl::Create(DWORD in_dwStyle, const RECT& in_rcRect, |
189 | 188 | CWnd* in_pParentWnd, UINT in_nID) |
190 | 189 | { |
… |
… |
|
231 | 230 | } |
232 | 231 | |
233 | 232 | return l_pState->m_hInstRichEdit20 != NULL ; |
234 | | }*/ |
| 233 | }/**/ |
235 | 234 | |
236 | 235 | int CStatusCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) |
237 | 236 | { |
… |
… |
|
239 | 238 | return -1; |
240 | 239 | |
241 | 240 | USES_CONVERSION; |
242 | | |
| 241 | |
| 242 | #ifdef _UNICODE |
| 243 | m_RTFHeader = "{\\rtf1\\ansi\\deff0\\ud"; |
| 244 | #else |
243 | 245 | m_RTFHeader = "{\\rtf1\\ansi\\deff0"; |
| 246 | #endif |
244 | 247 | |
245 | 248 | HFONT hSysFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); |
246 | 249 | |
… |
… |
|
317 | 320 | status.Replace(_T("\r"), _T("")); |
318 | 321 | status.Replace(_T("\n"), _T("\\status")); |
319 | 322 | |
| 323 | #ifdef _UNICODE |
| 324 | int len = status.GetLength(); |
| 325 | int i; |
| 326 | CString ustatus = "\\uc0"; |
| 327 | bool last_unicode = true; |
| 328 | for (i = 0; i < len; i++) { |
| 329 | wchar_t x; |
| 330 | char buf[20]; |
| 331 | |
| 332 | x = status[i]; |
| 333 | if (x < 256) { |
| 334 | if (last_unicode) { |
| 335 | ustatus += "{"; |
| 336 | ustatus += x; |
| 337 | ustatus += "}"; |
| 338 | } |
| 339 | else |
| 340 | ustatus += x; |
| 341 | last_unicode = false; |
| 342 | } |
| 343 | else { |
| 344 | sprintf(buf, "\\u%d.", (signed short)x); |
| 345 | ustatus += buf; |
| 346 | last_unicode = true; |
| 347 | } |
| 348 | } |
| 349 | status = ustatus; |
| 350 | #endif |
| 351 | |
320 | 352 | CString stime; |
321 | 353 | if (timestamps) |
322 | 354 | { |
… |
… |
|
501 | 525 | |
502 | 526 | void CStatusCtrl::ChangeFont(void) |
503 | 527 | { |
| 528 | #ifdef _UNICODE |
| 529 | m_RTFHeader = "{\\rtf1\\ansi\\deff0\\ud"; |
| 530 | #else |
504 | 531 | m_RTFHeader = "{\\rtf1\\ansi\\deff0"; |
| 532 | #endif |
505 | 533 | |
506 | 534 | HFONT hSysFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); |
507 | 535 | |
diff -Nur source/StatusCtrl.h source.patch/StatusCtrl.h
old
|
new
|
|
42 | 42 | virtual ~CStatusCtrl(); |
43 | 43 | |
44 | 44 | void ShowStatus(CString status, int nType); |
45 | | |
46 | | // virtual BOOL Create( DWORD in_dwStyle, const RECT& in_rcRect, |
47 | | // CWnd* in_pParentWnd, UINT in_nID ); |
| 45 | /**/ |
| 46 | virtual BOOL Create( DWORD in_dwStyle, const RECT& in_rcRect, |
| 47 | CWnd* in_pParentWnd, UINT in_nID ); |
48 | 48 | |
49 | 49 | // Generierte Nachrichtenzuordnungsfunktionen |
50 | 50 | protected: |
… |
… |
|
76 | 76 | void ChangeFont(void); |
77 | 77 | }; |
78 | 78 | |
79 | | /*class _AFX_RICHEDITEX_STATE |
| 79 | /**/class _AFX_RICHEDITEX_STATE |
80 | 80 | { |
81 | 81 | public: |
82 | 82 | _AFX_RICHEDITEX_STATE(); |
… |
… |
|
86 | 86 | }; |
87 | 87 | |
88 | 88 | BOOL PASCAL AfxInitRichEditEx(); |
89 | | */ |
| 89 | /**/ |
90 | 90 | |
91 | 91 | ///////////////////////////////////////////////////////////////////////////// |
92 | 92 | |