Re: DrawText question



Now the texts don't display at all.
Tried to do the StrConv first, in this case they display, but with the ugly
little squares every second character.
In what format does the string have to be to work with this declare?

Robert

"Mike D Sutton" <EDais@xxxxxxxx> wrote in message
news:%239zOJ%23cSGHA.1948@xxxxxxxxxxxxxxxxxxxxxxx
Whoops, I completely forgot that I use a wrapper function, which looks
like this:
<code snipped>
That should ensure the text is in unicode, should it not?

Try this declare/call instead:

'***
Private Declare Function DrawTextW Lib "User32.dll" ( _
ByVal hDC As Long, ByVal lpStr As Long, ByVal nCount As Long, _
ByRef lpRect As RECT, ByVal wFormat As Long) As Long

...

Call DrawTextW(hdc, StrPtr(lpStr), nCount, lpRect, wFormat)
'***

Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/




.



Relevant Pages

  • Re: DrawText question
    ... In what format does the string have to be to work with this declare? ... ByVal hDC As Long, ByVal lpStr As Long, ByVal nCount As Long, _ ... ByRef lpRect As RECT, ByVal wFormat As Long) As Long ...
    (microsoft.public.vb.winapi)
  • Re: help urgent
    ... Declare a dynamic array of stuctures. ... > in the event handler should display an OpenFileDialog allowing the user ... load the date from each array member into the combo box. ...
    (microsoft.public.vb.general.discussion)
  • Re: Where to declare Variables
    ... the input fields have php variables to display the ... Now to prevent notice warning for the variable I set it in the ... first it is a good practice to declare the variables before using them. ... The problem you describe sounds like a Zend IDE problem. ...
    (comp.lang.php)
  • Re: Where to declare Variables
    ... the input fields have php variables to display the ... Now to prevent notice warning for the variable I set it in the ... first it is a good practice to declare the variables before using them. ... The problem you describe sounds like a Zend IDE problem. ...
    (comp.lang.php)
  • Why do I receive no value error message, when parameters do have v
    ... ' Declare the ADO variable for the tbl_Referral_Data recordset ... Dim rstbl_RefSEN As New ADODB.Recordset ... ' Select the required data from tbl_Referral_Data and display the SEN data ...
    (microsoft.public.access.modulesdaovba)