| |
|
|
GDL | Hi,
find simply whom Error not.it ought to The actually row as String read go, get but only with Dim buffer#,255 only Striche back and the others Dim Version NEN Programmabsturz. thanks. CompileMarkSeparationdeclare hrtf&,line&,buffer#,ende%,dll&,zeile$,line1&
dll&=usedll("riched32.dll")
Def GetIntResult(0)&(0) für Suchfunktion
Def GetStringResult(0)$(0)
Def GetLineNr(1) SendMessage(&(1),$0436,0,-1) EM_EXLINEFROMCHAR Nullbasiert!
Def GetLineCount(1) SendMessage(&(1),$BA,0,0) Zeilenanzahl
Def GetLineLength(2) SendMessage(&(1),$0C1,&(2),0) em_getlinelength
Def IsWindow(1) !"USER32","IsWindow"
window 0,0 -1024,748
hrtf&=Control("richedit20a","",$54315004,5,0,800,400,%hwnd,2000,%hinstance)
setfocus(hrtf&)
sendstring(hrtf&,"Dies ist ein Test")
sendstring(hrtf&,chr$(10))
Proc GetLine
Parameters hrtf&,line&
Declare resulto$,l&
GetLineLength(hrtf&,line&)
Case Or(Equ(IsWindow(hrtf&),0),Equ(GetLineLength(hrtf&,line&),0)): Return ""
Dim buffer#,Add(GetLineLength(hrtf&,line&),1)
dim buffer#,255
SendMessage(hrtf&,$0C4,line&,buffer#)
Let resulto$=Char$(buffer#,0,255)
Dispose buffer#
Return resulto$
EndProc
======================================================================
Proc GetCurrentLine
Parameters hrtf&
GetLine hrtf&,GetLineNr(hrtf&)
Return GetStringResult()
EndProc
=======================================================================
whilenot ende%
GetCurrentLine hrtf&
Let zeile$=GetStringResult()
drawtext 1,600,zeile$
wend
case dll&:freedll dll&
Hello Georg |
|
|
| |
|
|
|
GDL | has itself Done.
Hello Georg |
|
|
| |
|
|
|
Michael Wodrich | DIM could sensitive the SendMessage react.
try it with Caching the values and indicated of/ one variables with DIM.
LineCount: it'll The Number of Lines zurückgegeben, but the count begins here (faith I) with zero. You müßtest it time with Return Value -1 try.
(only theoretisiert; fear to the angekündigten crash)
MfG Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 05/20/05 ▲ |
|
|
|
|
GDL | Have whom Error,
iss one Error in the wfrtf.inc.
instead of Return resulto$ must it Return trim$(resulto$) heissen.
Hello Georg |
|
|
| |
|
|