RICHEDIT_CLASS10A debugging and testing
Hi I am trying to build a test case for a bug I have with RichEdit10ANSIWndProc called with EM_GETTEXTRANGE on an editor with two newlines at the end of the range. In such case ME_GetTextW is called with editor->bEmulateVersion10 which does nChars--;. In the case of a newline nChars is 1 thus become 0 and -1 a little while later when the code is : nChars-=nLen (where nLen is 1 as we reach the end of the range on newlines). My workaround is to add : if (nChars == 1) nLen = 0; after the editor->bEmulateVersion10 but I do not understand why it works (well except that having nChars being -1 is bad) and if nLen-- without the if nChars == 1 would be better. So I am trying to add a test case to riched20 by defining: static HWND new_richedit10A(HWND parent) { return new_window(RICHEDIT_CLASS10A, ES_MULTILINE, parent); } but this fails with an invalid handler error. Could someone help me ? Thank you Alban ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com
participants (1)
-
Alban Browaeys