[Bug 6814] New: Selecting text with EM_EXSETSEL and RICHEDIT
Wine Bugs
wine-bugs at winehq.org
Fri Dec 1 04:26:04 CST 2006
http://bugs.winehq.org/show_bug.cgi?id=6814
Summary: Selecting text with EM_EXSETSEL and RICHEDIT
Product: Wine
Version: unspecified
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-gui
AssignedTo: wine-bugs at winehq.org
ReportedBy: sulio at vt.demosten.com
I often use EM_EXSETSEL to select the end of the text and then replace the
selection in order to achieve clear text appending. Here is my code (MFC but I
believe the idea is clear):
int len = logCtrl->GetWindowTextLength();
logCtrl->SetSel(len, -1); // here comes the problem WINE crash
logCtrl->ReplaceSel(text);
The control is RICHEDIT and WINE gives me:
run.c:193: ME_RunOfsFromCharOfs: Assertion `nCharOfs >= nParaOfs' failed.
wine: Assertion failed at address 0xffffe410 (thread 0009), starting debugger...
According to MSDN:
The CHARRANGE structure specifies a range of characters in a rich edit control.
This structure is used with the EM_EXGETSEL and EM_EXSETSEL messages.
If the cpMin and cpMax members are equal, the range is empty. The range includes
everything if cpMin is 0 and cpMax is 1.
They don't say -1 is always "the end" but that's how MS code works.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list