I think we're on the right track, we just don't have the exact definition yet.  
Try either ""coredll"" (no extension) or ""coredll.dll""  coredll.lib would be 
the object module if you were compiling it directly into your application.

--- In nsbasic...@yahoogroups.com, "andyx77" <sng.al...@...> wrote:
>
> If, in the function declaration, I specify coredll... e.g:
> 
> Declare "Function GetTextExtentPoint32 Lib ""Coredll.lib"" (ByVal hDC As 
> Long, ByVal lpsz As String, ByVal cbString As Long, byVal lpSize() As Long) 
> As Long"
> 
> I then get the same error message!
> 
> 
> 
> 
> --- In nsbasic...@yahoogroups.com, "George Henne" <gh@> wrote:
> >
> > I haven't tried this myself, but isn't the correct library coredll.lib,
> > at least according to this?
> > <http://msdn.microsoft.com/en-us/library/aa911432.aspx>
> > 
> > 
> > >I'm struggling to get started with this. I keep getting the error
> > >"Variable is undefined" with my test code, no matter what variations I
> > >try. Am I making a glaringly obvious error?
> > >
> > >I'm declaring the function as follows:
> > >
> > >Declare "Function GetTextExtentPoint32 Lib ""gdi32"" (ByVal hDC As Long,
> > >ByVal lpsz As String, ByVal cbString As Long, byVal lpSize() As Long)
> > As Long"
> > >
> > >The error occurs on the following line:
> > >
> > >If GetTextExtentPoint32(hdc, "Hello", Len("Hello"), thisTextSize) <> 0 Then
> > >
> > >The context is:
> > >
> > >Dim thisTextSize(1)
> > >Dim thisSize
> > >Dim hdc
> > >
> > >hdc = GetDC(lblSomeText.hwnd)
> > >           
> > >'--->Error occurs on following line:                               
> > >If GetTextExtentPoint32(hdc, "Hello", Len("Hello"), thisTextSize) <> 0 Then
> > >
> > >  thisSize = thisTextSize(0)
> > >Else
> > >  thisSize = 0
> > >End If
> > >           
> > >
> > >
> > >
> > >--- In nsbasic...@yahoogroups.com, "George Henne" <gh@> wrote:
> > >>
> > >> You might be able to do this with a DECLARE function. The underlying API
> > >> call you have to make is this:
> > >> 
> > >> <http://msdn.microsoft.com/en-us/library/ms901137.aspx>
> > >> 
> > >> 
> > >> 
> > >> >Hi
> > >> >
> > >> >Does anyone know if it's possible to determine the width of a text
> > >> >string at a given font size (similar to VB's TextWidth function)?
> > >> >
> > >> >Andrew
> > >> >
> > >> >
> > >> >
> > >> >------------------------------------
> > >> >
> > >> >Yahoo! Groups Links
> > >> >
> > >> >
> > >> >
> > >>
> > >
> > >
> > >
> > >
> > >------------------------------------
> > >
> > >Yahoo! Groups Links
> > >
> > >
> > >
> >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to