Re: Win32Lib and Unicode
- Posted by CChris <christian.cuvier at agricultur?.go?v.fr> Mar 07, 2008
- 625 views
Pete Stoner wrote: > > Hi Guys, > I've got a nice routine to convert UTF-8 into "Windows" unicode (adapted from > routines by Tommy Carlier) along with a modified wPuts to write the unicode > to my window. That bit is working fine but now to complete the jigsaw I need > a unicode version of setHint and at the moment I can't see an easy way to do > it, can anyone help? > > Regards PeteS Simply use setHint[Ex]() and pass a routine_id as spelled out in the docs. The routine will return an Euphoria sequence representing your 16-bit encoded text, like {'H',0,'e',0,'l',0,'l',0,'o',0,0}. Note the extra zero at the end, because w32store() will add only one and 16-bit strings need 2 of them. So the char #ABCD would be coded as #CD,#AB. Also, make sure the tooltip font supports the characters you are going to display. You may need to call setHintFont() for this purpose. I didn't test this, but I'd be confident, if only because there are no special Unicode tooltip messages in the API. HTH CChris