Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
Sending large amounts of text (30K) to a RichEdit20W window causes that RichEdit20W to be deleted. The window does not show up as a child window using Spy++ or similar tools, and there are some debug messages like :
(subsystems/win32/win32k/objects/dc.c:933) No! You Naughty Application!
This can be seen in Winzip 11.1 installer, where the license does not show (above the I agree / I don't agree buttons). I was just installing random things looking for bugs.
This does NOT show up when ROS versions of msiexec.exe, msi.dll, and riched20.dll run on windows. It does show when Windows versions are run on ROS. Plus other things make me think it is in gdi32 or user32, and not in WINE code.
I have a sample program which loads RTF data from a file, and sends it to a RichEdit20W window. Using the short text, "resource.txt", this works fine. Using the winzip license RTF exposes the problem. Rename "winzip.rtf" to "resource.txt" to see the difference.
Note: the file name that is opened is hard-coded (see GetResourceFileName() function) and is "resource.txt" in the same folder where the DlgBased.exe app is.
I also think RichEdit20W is misunderstanding EN_UPDATE message, sent via WM_COMMAND. I think this is a WINE problem, though. It gives this debug message:
err:(dll\win32\msi\dialog.c:3119) button click from nowhere
Is this sample application helpful, or does it make things more confusing? I would be happy to join IRC to explain what this does if it would help. The rest of this report is an overview of the sample application.
The sample does a few simple things, although it looks complicated.
WinMain loads riched20.dll, and creaes a dialog using DialogBox
The dialog, on WM_INITDIALOG, creates the RichEdit20W window using CreateTestWindow()
This CreateWindowExW() call has the same parameters as the WinZip installer
If the window was created, it converts the WCHAR RTF data into ASCII data (yes it is cheating)
SetRtfText() is where the text gets sent. It sends EM_STREAMIN message to the RichEdit window, same way as WinZip installer does.
RichEdit window then calls EditStreamCallback() for data.