summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2015-02-16 06:00:55 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2015-02-16 06:00:55 +0000
commit133b4b92d9acb1f4c63205cfe33665f3d1717d44 (patch)
tree9ac63b44a34eea18f20da4a0c2c793f194f13d9d
parentcbcc473a73ebb6f4fc1ed9077932b729e368ff5f (diff)
TabSRMM: code cleanup + wine fixes for display sended and received message
LinkList: wine fixes Scriver: wine fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp22
-rw-r--r--plugins/Scriver/src/infobar.cpp8
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp10
-rw-r--r--plugins/TabSRMM/src/msglog.cpp47
4 files changed, 41 insertions, 46 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index ab280df73b..38e4ec32b9 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -311,7 +311,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.dwEffects = CFE_BOLD;
cf.crTextColor = colourSet.text;
_tcscpy_s(cf.szFaceName, _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
mir_sntprintf(searchText, SIZEOF(searchText), _T("%s '%s': %d\n\n"), TranslateT("Matches for searchtext"), searchString, listCount);
SendDlgItemMessage(hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)searchText);
@@ -322,7 +322,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
_tcscpy_s(cf.szFaceName, _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
actualElement = listStart->nextElement;
@@ -415,7 +415,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR;
cf.crTextColor = colourSet.text;
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
if ( options.showLine != 0 )
DrawLine(hDlg, lineLen);
memset(&cf, 0, sizeof(cf));
@@ -423,7 +423,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
_tcscpy_s(cf.szFaceName, _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options.showDate != 0 )
{
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) actualElement->date);
@@ -435,7 +435,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.cbSize = sizeof cf;
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
_tcscpy_s(cf.szFaceName, _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
}
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
@@ -493,7 +493,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
_tcscpy_s(cf.szFaceName, _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)TranslateT("No messages found!\nPlease change current filter options."));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
}
@@ -534,7 +534,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.dwMask = CFM_FACE | CFM_BOLD | CFM_ITALIC | CFM_COLOR;
_tcscpy_s(cf.szFaceName, _T("Courier"));
cf.crTextColor = TxtColourSel;
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options->showLine == 1 )
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("___________________________________________\n"));
else
@@ -546,7 +546,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.dwEffects = CFE_BOLD;
_tcscpy_s(cf.szFaceName, _T("Arial"));
cf.crTextColor = TxtColourSel;
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if(options->showDate == 1)
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)TXT_DATE);
@@ -557,7 +557,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
_tcscpy_s(cf.szFaceName, _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
// incoming
memset(&cf, 0, sizeof(cf));
@@ -565,7 +565,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = InColourSel;
_tcscpy_s(cf.szFaceName, _T("Courier"));
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf );
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf );
if ( options->showDirection == 1 )
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n[in ] "));
@@ -588,7 +588,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = OutColourSel;
_tcscpy_s(cf.szFaceName, _T("Courier"));
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
if ( options->showDirection == 1 )
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index e096a01886..301ab1f909 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -42,7 +42,9 @@ void SetupInfobar(InfobarWindowData* idat)
cf2.wWeight = (WORD)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY;
- SendDlgItemMessageA(hwnd, IDC_INFOBAR_NAME, EM_SETCHARFORMAT, 0, (LPARAM)&cf2);
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_NAME, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2);
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_NAME, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); /* WINE: fix send colour text. */
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_NAME, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); /* WINE: fix send colour text. */
LoadMsgDlgFont(MSGFONTID_INFOBAR_STATUS, &lf, &colour);
cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_BOLD | CFM_ITALIC;
@@ -54,7 +56,9 @@ void SetupInfobar(InfobarWindowData* idat)
cf2.wWeight = (WORD)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY;
- SendDlgItemMessageA(hwnd, IDC_INFOBAR_STATUS, EM_SETCHARFORMAT, 0, (LPARAM)&cf2);
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_STATUS, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2);
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_STATUS, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); /* WINE: fix send colour text. */
+ SendDlgItemMessage(hwnd, IDC_INFOBAR_STATUS, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); /* WINE: fix send colour text. */
RefreshInfobar(idat);
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 299f0fa536..6f20e66691 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -797,6 +797,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
if (!fIsChat && GetWindowTextLength(hwndEdit) > 0)
szStreamOut = Message_GetFromStream(hwndEdit, dat, (CP_UTF8 << 16) | (SF_RTFNOOBJS | SFF_PLAINRTF | SF_USECODEPAGE));
+ SetWindowText(hwndEdit, _T(""));
SendMessage(hwndLog, EM_SETBKGNDCOLOR, 0, colour);
SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->inputbg);
@@ -818,7 +819,6 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
cf2.wWeight = (WORD)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 15;
- SetWindowText(hwndEdit, _T(""));
}
else {
LOGFONTA lf = dat->pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
@@ -839,6 +839,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
}
SendMessage(hwndEdit, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2);
SendMessage(hwndEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); /* WINE: fix send colour text. */
+ SendMessage(hwndEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); /* WINE: fix send colour text. */
// setup the rich edit control(s)
// LOG is always set to RTL, because this is needed for proper bidirectional operation later.
@@ -864,14 +865,12 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
pf2.dxRightIndent = 30;
}
pf2.dxOffset = dat->pContainer->theme.left_indent + 30;
+
if (!fIsChat) {
SetWindowText(hwndLog, _T(""));
SendMessage(hwndLog, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SendMessage(hwndLog, EM_SETLANGOPTIONS, 0, (LPARAM)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
- }
-
- // set the scrollbars etc to RTL/LTR (only for manual RTL mode)
- if (!fIsChat) {
+ // set the scrollbars etc to RTL/LTR (only for manual RTL mode)
if (dat->dwFlags & MWF_LOG_RTL) {
SetWindowLongPtr(hwndEdit, GWL_EXSTYLE, GetWindowLongPtr(hwndEdit, GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
SetWindowLongPtr(hwndLog, GWL_EXSTYLE, GetWindowLongPtr(hwndLog, GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
@@ -880,7 +879,6 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
SetWindowLongPtr(hwndEdit, GWL_EXSTYLE, GetWindowLongPtr(hwndEdit, GWL_EXSTYLE) &~(WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
SetWindowLongPtr(hwndLog, GWL_EXSTYLE, GetWindowLongPtr(hwndLog, GWL_EXSTYLE) &~(WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
}
- SetWindowText(hwndEdit, _T(""));
}
if (szStreamOut != NULL) {
SETTEXTEX stx = { ST_DEFAULT, CP_UTF8 };
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 098ea3c312..9a8b32f15d 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -316,11 +316,7 @@ static void Build_RTF_Header(char *&buffer, size_t &bufferEnd, size_t &bufferAll
COLORREF *fontColors = dat->pContainer->theme.fontColors;
TLogTheme *theme = &dat->pContainer->theme;
- // rtl
- if (dat->dwFlags & MWF_LOG_RTL)
- AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\rtf1\\ansi\\deff0{\\fonttbl");
- else
- AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\rtf1\\ansi\\deff0{\\fonttbl");
+ AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\rtf1\\ansi\\deff0{\\fonttbl");
for (i = 0; i < MSGDLGFONTCOUNT; i++)
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\f%u\\fnil\\fcharset%u %s;}", i, logFonts[i].lfCharSet, logFonts[i].lfFaceName);
@@ -351,8 +347,6 @@ static void Build_RTF_Header(char *&buffer, size_t &bufferEnd, size_t &bufferAll
// custom template colors...
for (i = 1; i <= 5; i++) {
- char szTemp[30];
- mir_snprintf(szTemp, SIZEOF(szTemp), "cc%d", i);
colour = theme->custom_colors[i - 1];
if (colour == 0)
colour = RGB(1, 1, 1);
@@ -490,7 +484,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
if (dat->isAutoRTL & 2) { // means: last \\par was deleted to avoid new line at end of log
- AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\par");
+ AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\par\\pard");
dat->isAutoRTL &= ~2;
}
@@ -583,7 +577,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
dat->hHistoryEvents[dat->curHistory++] = hDbEvent;
}
- AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\ul0\\b0\\i0 ");
+ AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\ul0\\b0\\i0\\v0 ");
for (size_t i = 0; i < iTemplateLen;) {
TCHAR ci = szTemplate[i];
@@ -1170,7 +1164,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
sel.cpMax = -1;
SMADD_RICHEDIT3 smadd = { sizeof(smadd) };
- smadd.hwndRichEditControl = GetDlgItem(hwndDlg, IDC_LOG);
+ smadd.hwndRichEditControl = hwndrtf;
smadd.Protocolname = const_cast<char *>(dat->cache->getActiveProto());
smadd.hContact = dat->cache->getActiveContact();
smadd.flags = isSent ? SAFLRE_OUTGOING : 0;
@@ -1283,15 +1277,15 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
szYourName = const_cast<TCHAR *>(dat->cache->getNick());
szMyName = dat->szMyNickname;
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_HIDESELECTION, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXGETSEL, 0, (LPARAM)&oldSel);
+ SendMessage(hwndrtf, EM_HIDESELECTION, TRUE, 0);
+ SendMessage(hwndrtf, EM_EXGETSEL, 0, (LPARAM)&oldSel);
LogStreamData streamData = { 0 };
streamData.hContact = dat->hContact;
streamData.hDbEvent = hDbEventFirst;
streamData.dlgDat = dat;
streamData.eventsToInsert = count;
- streamData.isEmpty = fAppend ? GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOG)) == 0 : 1;
+ streamData.isEmpty = fAppend ? GetWindowTextLength(hwndrtf) == 0 : 1;
streamData.dbei = dbei_s;
streamData.isAppend = fAppend;
@@ -1304,15 +1298,15 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
GETTEXTLENGTHEX gtxl = { 0 };
gtxl.codepage = 1200;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
- startAt = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
- sel.cpMin = sel.cpMax = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOG));
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
+ startAt = SendMessage(hwndrtf, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
+ sel.cpMin = sel.cpMax = GetWindowTextLength(hwndrtf);
+ SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
}
else {
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetWindowText(hwndrtf, _T(""));
sel.cpMin = 0;
sel.cpMax = GetWindowTextLength(hwndrtf);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
+ SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
startAt = 0;
dat->isAutoRTL = 0;
}
@@ -1320,9 +1314,9 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
// begin to draw
SendMessage(hwndrtf, WM_SETREDRAW, FALSE, 0);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&oldSel);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_HIDESELECTION, FALSE, 0);
+ SendMessage(hwndrtf, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
+ SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&oldSel);
+ SendMessage(hwndrtf, EM_HIDESELECTION, FALSE, 0);
dat->hDbEventLast = streamData.hDbEventLast;
if (dat->isAutoRTL & 1)
@@ -1334,10 +1328,10 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
gtxl.codepage = 1200;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
- sel.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
+ sel.cpMax = SendMessage(hwndrtf, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
sel.cpMin = sel.cpMax - 1;
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
+ SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
dat->isAutoRTL |= 2;
}
@@ -1355,9 +1349,8 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
DM_ScrollToBottom(dat, 0, 0);
- HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG);
- SendMessage(hwndLog, WM_SETREDRAW, TRUE, 0);
- InvalidateRect(hwndLog, NULL, FALSE);
+ SendMessage(hwndrtf, WM_SETREDRAW, TRUE, 0);
+ InvalidateRect(hwndrtf, NULL, FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_QUOTE), dat->hDbEventLast != NULL);
mir_free(streamData.buffer);
}