Unicode title bar issue

Unicode title bar issue

Postby rhlawek » Sun Aug 28, 2016 9:51 pm

Using 16.06, msvs 2015.

I've encountered an issue with properly displaying text with a FWH app built as unicode, where the only place I see the issue is on Server 2008 R2. I cannot produce the issue under W10 where I am developing. I'm working around the issue at the moment by doing a non-unicode build. I've made numerous attempts to fix the issue by editing the TWindow class, but so far I haven't been able to change the problem at all. Setting FW_SetUnicode either .t. or .f. has no effect on the issue,

Create a window, giving it any title one wishes, and it displays correctly under W10. For purpose of discussing let's assume the window (::cCaption specifically) is set to "Test" The same executable put on 2008 R2 shows a title bar displaying what appears to be a chinese character set. If you put the window in a busy state, when windows itself changes the title bar to be suffixed with "(Not responding)" it actually displays as "Test (Not responding)", as soon as the busy stated is cleared it reverts to the incorrect character set display.

The other thing I noticed is if I attempt to change the oWnd:cCaption at runtime, again assume it is being set to "Test" the only thing that displays on the screen is the first "T". This seems to tell me that there is a unicode string being processed as single byte but I haven't figured out where that is happening.

I can't really provide a test utility, every program behaves the same way if I compile it with unicode, it is only the 2008 R2 environment where I see the problem at all.

Robb
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: Unicode title bar issue

Postby rhlawek » Mon Aug 29, 2016 2:49 am

I finally figured out what is needed to cause the error, and how to eliminate the error. I use the TScalar class, all programs I build have the following line:

ENABLE TYPE CLASS ALL

When enabled I get the behavior described in the previous post, commenting it (disabling) makes things behave correctly. I haven't determined why that is yet, or why it is only on 2008 R2.

Robb
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests