$H windows.ph
Struct RECT = left&,top&,right&,bottom&
CLS
Var Text$ = "Das is a langer Text, the umgebrochen go soll"
Text Color $ff,-1
DrawText 10,10,Text$
Var Rect# = New(RECT)
~SetRect(Rect#,10,40,200,100)
~DrawText(%hdc2,Addr(Text$),Len(Text$),Rect#,~DT_WORDBREAK)
Repaint
waitinput
end