richedit's RTF writer writes only 8 kBi; my shell32 load-menu-from-resources patch

Tobias Burnus burnus at
Fri Jun 17 07:19:37 CDT 2005


assuming that this patch has not been commited since AJ does not regard 
it as obvious and riskfree (or even as wrong), how could I improve the 
patch at
(Loads the file/folder context menu of the file menus from the resource 

In addition, I have the problem with exporting RTF files using richedit: 
They are all cropped at 8 kBi (= 8192 bytes) - at least using the 
program Diamond2 (even if only a final '}' is missing).

Grepping through the sources I see:
    dlls/riched20/editstr.h:#define STREAMOUT_FONTTBL_SIZE 8192
and in the writer.c file:
  static BOOL
  ME_StreamOutRTFText(ME_TextEditor *editor, WCHAR *text, LONG nChars)
     char buffer[STREAMOUT_BUFFER_SIZE];
    if (pos >= STREAMOUT_BUFFER_SIZE - 11) {
      if (!ME_StreamOutMove(editor, buffer, pos))
        return FALSE;

I don't know whether this is my problem, does someone with more insight 
in richedit's RTF writer.c see how to fix this? Or when the problem is 
elsewhere, how to test for it?



PS: Kudos to all Wine developers, especially (since talking of richedit) 
to Krzysztof Foltman and Phil Krylov; Wine has made a huge lap for me 
recently and I have the feeling it comes closer and closer to the point 
where things simply run. :-)
(Unfortunally, only 2 of 4 of my programs run, but they do better and 
better and I've the feeling the other two come closer to be able to be 

More information about the wine-devel mailing list