https://bugs.winehq.org/show_bug.cgi?id=38125
Bug ID: 38125 Summary: MFC CRichEditCtrl does not correctly put text in Center, Right or Left Product: Wine Version: 1.7.36 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winelib Assignee: wine-bugs@winehq.org Reporter: reinhold.hoffmann@hotmail.com Distribution: ---
Created attachment 50818 --> https://bugs.winehq.org/attachment.cgi?id=50818 Source code to demonstrate the issue
Notation Software Germany (www.notation.com) Dr. Reinhold Hoffmann Eduard Thoeny Str. 6 D-86919 Utting am Ammersee Germany email: reinhold.hoffmann@hotmail.com
Re: MFC CRichEditCtrl does not correctly put text in Center, Right or Left ==========================================================================
Dear WineHQ-Team,
we use Wine for our products from Notation Software (Notation Composer, Notation Musician, for more see www.notation.com) on Linux and MACs. We encountered a problem that using MFC CRichEditCtrl. When creating a CRichEditCtrl Windows with Create, the Window can be configured that the text is left aligned, centered or right aligned. On WineHQ all text is left aligned even when the parameter ES_CENTER, ES_RIGHT are set.
In order to demontrate the issue we took public available code from the CodeProject from here:
http://www.codeproject.com/Articles/9639/Text-Editor-in-C-using-CRichEditCtr...
Please find in the attached zip file:
- demo TextEdit.exe Run this on Windows. Type in some letters and you will see that the text is in the center of the Window Run this on WineQH (we used Ubuntu, Wine_1.7.36 or MAC with Wine_1.7.36). You will see that the inserted text is left aligned in any case.
- TextEdit_src.zip file with the source code of the demo TextEdit This demo was created using Microsoft VS2010. Please see the file MainFrm.cpp around line 64. Please try yourself by using the option there. You will see that in any case the text is only left-aligned.
We from Notation Software certify our products on WineHQ and it would be great if someone could fix the issue.
Many thanks in particular for this great achievement of WineHQ
Best regards,
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|winelib |-unknown
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Does it work with native riched20?
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #2 from Reinhold reinhold.hoffmann@hotmail.com --- (In reply to Nikolay Sivov from comment #1)
Does it work with native riched20?
Hi Nikoly,
thx for your immediate response.
Yes, indeed. I installed rich20 from the Ubuntu distribution and with this lib the alignment left, center, right is OK.
Question: Is the solution then that we have to give an advice to our customers that they shoudl install that dll? As rich text 2.0 is very common and almost standard, would it be advantageous to have riched20 always be part of the standard package?
Please advice.
Again thx for your immediate help.
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #3 from Reinhold reinhold.hoffmann@hotmail.com --- I understand now why the riched20 cannot distributed as part of WineHQ. It is a license topic.
We have updated our installation guide accordingly.
Nickolay, thanks for your help
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #4 from Ken Thomases ken@codeweavers.com --- I believe that Nikolay was mostly asking in order to help diagnose the issue. Knowing that native riched20 works around the issue isolates the problem to a deficiency in Wine's built-in riched20.
He wasn't suggesting that Wine wouldn't or couldn't fix the problem.
Having your clients install native riched20 is a potential workaround that you can recommend as you see fit until Wine is fixed, but is not considered a solution.
https://bugs.winehq.org/show_bug.cgi?id=38125
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |richedit
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- Right, I was only interested in making sure it's a right component. So bug is still valid obviously, but now you know what you can do to workaround it until it's fixed in Wine.
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #6 from Reinhold reinhold.hoffmann@hotmail.com --- Hi Ken, hi Nikolay,
thanks.
I had just wrote a comment off-line where I wanted to asked you to have it included because a "workaround" with MByte libs in size cannot be an alternative for such a basic issue. And, additional lib installations are always critical.
I like your statements and, Nikolay, thanks a lot for your short term workaround.
I hope that my simple demo code will help you to see the issue and is useful for a test. For the upcoming product release of Notation Composer and Notation Musician we will go with the workround and take it out as soon as a fix in Wine is available.
Again, thanks for your support and help.
Best regards,
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
Reinhold reinhold.hoffmann@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |reinhold.hoffmann@hotmail.c | |om
https://bugs.winehq.org/show_bug.cgi?id=38125
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
--- Comment #7 from Austin English austinenglish@gmail.com --- Could you please attach a +tid,+richedit trace?
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #8 from Reinhold reinhold.hoffmann@hotmail.com --- Created attachment 50843 --> https://bugs.winehq.org/attachment.cgi?id=50843 Trace File of the app from other attachment
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #9 from Reinhold reinhold.hoffmann@hotmail.com --- ... well, which required me to completely deinstall and re-install Wine and all the Windows applications in order to get rid of riched20.dll which I should install before, because Winetricks cannot de-install dlls.
But here you go. Please find the log file of the application attached which I created with the demo TextEdit.exe from the other attachment with the command
$ WINEDEBUG=+tid,+richedit wine TextEdit.exe > TextEdit_Debug_log.txt 2>&1
In the trace I just typed "Test" and ENTER
Again, thanks for getting this bug fixed.
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #10 from Nikolay Sivov bunglehead@gmail.com --- You don't have to reinstall anything, certainly not Wine itself. You could use Libraries tab of winecfg to set this dll to builtin, that's all you had to do.
https://bugs.winehq.org/show_bug.cgi?id=38125
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jactry92@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #11 from Reinhold reinhold.hoffmann@hotmail.com --- Thanks. I see and are still learning :). I hope I was able to provide all required information.
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #12 from Jactry Zeng jactry92@gmail.com --- Created attachment 50866 --> https://bugs.winehq.org/attachment.cgi?id=50866 Testcase for reproducing
Confirming.
Wine's riched20 still not support ES_CENTER, ES_LEFT, ES_RIGHT.
https://bugs.winehq.org/show_bug.cgi?id=38125
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Assignee|wine-bugs@winehq.org |jactry92@gmail.com Ever confirmed|0 |1
--- Comment #13 from Jactry Zeng jactry92@gmail.com --- Created attachment 50868 --> https://bugs.winehq.org/attachment.cgi?id=50868 hack for adding ES_CENTER support
Here is a quick hack for it. Need more tests.
https://bugs.winehq.org/show_bug.cgi?id=38125
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|jactry92@gmail.com |wine-bugs@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #14 from Reinhold reinhold.hoffmann@hotmail.com --- My observation: ES_CENTER in Riched20.dll downloaded with Winetricks from Microsoft works fine. In Riched20.dll configured with winecfg, ES_CENTER does not work.
Regarding the use with Winetricks please see the issue which I ran into above. I therefore do not recommend it.
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #15 from Reinhold reinhold.hoffmann@hotmail.com --- By when will this bug will be corrected? Is there a plan for any of the next upcoming beta versions?
Thanks
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #50868|0 |1 is obsolete| |
--- Comment #16 from Jactry Zeng jactry92@gmail.com --- Created attachment 52684 --> https://bugs.winehq.org/attachment.cgi?id=52684 patch for implementing alignment styles support
https://bugs.winehq.org/show_bug.cgi?id=38125
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |6401ab45c0a45f328dcf3645195 | |53f20a360e672 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #17 from Jactry Zeng jactry92@gmail.com --- Fixed: http://source.winehq.org/git/wine.git/?a=commit;h=6401ab45c0a45f328dcf364519...
https://bugs.winehq.org/show_bug.cgi?id=38125
--- Comment #18 from Reinhold reinhold.hoffmann@hotmail.com --- Thanks
Reinhold
https://bugs.winehq.org/show_bug.cgi?id=38125
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.55.