Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - DrawText

Posted in WinTask

'
' DrawText
'
' Draw some text on the Desktop
'

dim ptr as unsigned
dim ptr2 as unsigned

ptr=allocate(16)
ptr2=ptr+0
pokeinteger(ptr2,0,4)
ptr2=ptr+4
pokeinteger(ptr2,0,4)
ptr2=ptr+8
pokeinteger(ptr2,640,4)
ptr2=ptr+12
pokeinteger(ptr2,32,4)

hdc=External("gdi32","CreateDCA","DISPLAY",0,0,0)

'Private Type RECT
'    Left As Long
'    Top As Long
'    Right As Long
'    Bottom As Long
'End Type

'Flag:
'    0 = left
'    1 = center
'    2 = right

mytext$="This is a test"

External("user32","DrawTextA",hdc, mytext$,len(mytext$),ptr,0)
   
External("gdi32","DeleteDC")


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now