English
Forum

space on the Beginning of the line

 

GDL
Hello Profaner,

have the trouble, I with folgendem code not hinbekomme, that too The space at the beginning of/ one row in the RTF with zurückgegeben go.Perhaps knows someone council or ne others Solution.thanks.
CompileMarkSeparation
 $H Windows.ph
 $H Messages.ph
 $H Richedit.ph
declare reg&,ende%,ende&,zeile$
Struct CHARRANGE = cpMin&,cpMax&
================================================================

Proc RicheditGetLine

    Parameters REG&
    returns linechars
    Declare Range#,Retval&,Ret$,RetLong&
    Dim Range#,CHARRANGE
    SendMessage(REG&,~EM_EXGETSEL,0,Range#)
    Retval& = SendMessage(REG&,~EM_EXLINEFROMCHAR,0,Range#.cpMin&)
    Ret$ = Space$(100000)  Zeile weglassen bringt Profan zum sofortigen Absturz
    SendMessage(REG&,~EM_GETLINE,Retval&,Addr(Ret$))
    Dispose Range#
    Return Trim$(Ret$)     bei   return ret$   kein Reagieren

EndProc

======================================================================
window 0,0 - 600,600
ende&=createbutton(%hwnd,"Ende",500,500,80,20)
reg&=@Create("RichEdit",%hwnd,"",10,10,200,200)
setfocus(reg&)
clear ende%

whilenot ende%

    getmessage
    case getfocus(ende&):ende%=1

    if &wparam=13

        beep
        sendkey(reg&,8)
        zeile$=RicheditGetLine(reg&)
        sendkey(reg&,10)
        sendstring(reg&,zeile$)
        sendkey(reg&,10)

    endif

wend


Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/31/05  
 



swaps

return trim(..
in
return ..

salvo.
 
07/31/05  
 




GDL
Hello iF,

have it in the code vermerkt, with return ret$ no react the Program More.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/31/05  
 




Jörg
Sellmeyer
comic... by me Gibts with Return Ret$ no Problems
Win98SE - Perhaps ists Yes with ME time again everything differently....
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/01/05  
 




GDL
Hello Jörg

if I whom code folgendermassen abändere and then 1 + Return eingebe siehts loudly attachment from.One return ret$ has a crash to follow, the only yet with the Resetknopf exits go can.
with Display in the Mainwindow with drawtext happens this.
CompileMarkSeparation
 $H Windows.ph
 $H Messages.ph
 $H Richedit.ph
declare reg&,ende%,ende&,zeile$,lang&
Struct CHARRANGE = cpMin&,cpMax&
================================================================

Proc RicheditGetLine

    Parameters REG&
    returns linechars
    Declare Range#,Retval&,Ret$,RetLong&
    Dim Range#,CHARRANGE
    SendMessage(REG&,~EM_EXGETSEL,0,Range#)
    Retval& = SendMessage(REG&,~EM_EXLINEFROMCHAR,0,Range#.cpMin&)
    Ret$ = Space$(100000)  Zeile weglassen bringt Profan zum sofortigen Absturz
    SendMessage(REG&,~EM_GETLINE,Retval&,Addr(Ret$))
    Dispose Range#
    zeile$=ret$
    Return Trim$(Ret$)     bei   return ret$   kein Reagieren

EndProc

======================================================================
window 0,0 - 600,600
ende&=createbutton(%hwnd,"Ende",500,500,80,20)
reg&=@Create("RichEdit",%hwnd,"",10,10,200,200)
setfocus(reg&)
clear ende%

whilenot ende%

    getmessage
    case getfocus(ende&):ende%=1

    if &wparam=13

        sendkey(reg&,8)
        RicheditGetLine(reg&)
        sendkey(reg&,10)
        sendstring(reg&,zeile$)
        sendkey(reg&,10)
        zeile$=left$(zeile$,80)
        drawtext 1,500,zeile$

    endif

wend


Hello
Georg

104 kB
Hochgeladen:08/01/05
Downloadcounter45
Download
 
Windows7 Xprofan 8,9,10 [...]  [...] 
08/01/05  
 



And if You time instead of
CompileMarkSeparation
Return Ret$
einfach
Return mid$(ret$,1,len(ret$))re>

write?
 
08/01/05  
 




GDL
Hello iF,

super this goes, though I net wisely Why.hang this with the Richedit dll Version Perhaps together? becomes without The Längenbeschränkung otherwise too much zurückgegeben(Überschreiten the Profan-String-Length).
On any Cases must I The length still with ret$=left$(ret$,150)
limit, there otherwise yet ne Leerzeile eingefügt becomes.but It's all right now.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
08/01/05  
 



Something like have I me virtual. therefore my Tipp.

I had me on your place simply time the what of Sendmessage zurückgegeben becomes 1:1 in the Hexeditor angeschaut. I have me virtual the there Perhaps too yet etwaige Sonderzeichen übermittelt go - and the XProfan at Return or. with the Disclosure there something in memory wrong power. means - ploy 1.5e17 - schubse whom Content the Strings first by a XProfan-Own Stringmanipulationsprozedur. to that Glätten quasi.

salvo.
 
08/01/05  
 



Nachtrag: (weils Quickposten son Fun power.) ^^

Perhaps had the already gereicht:
CompileMarkSeparation
declare bval$
...
//hier Dein Code
...
sendmessage(...
...
bval$=ret$
return$
or XPSEler:
CompileMarkSeparation
...
//here your code
...
swap ret$,ret$
return ret$
Hm - Perhaps had that here already gereicht:
CompileMarkSeparation
...
//here your code
ret$=ret$
return ret$
salvo, iF.
 
08/01/05  
 




GDL
alas I Have still Windows to endearing, lauter nice things for Beginner, so How I.
I faith I custom ne Auszeit. in the geposteten code GEHTS, in the application then goes nothing more. it'll of course in the Richedit everything wonderful displayed, but I can whom String not any more evaluate, since the eigentliche information of lauter small senkrechten Strichen umrahmt is.These vanish of course with return trim(ret$) my space on the Beginning of the line but unfortunately too.

apparently is not possible, The actually row one Richedit so auszulesen, as row objectively is.Schade.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
08/01/05  
 



Dochdoch ists - I probiers tommorrow forenoon same time.

salvo.
 
08/01/05  
 




Michael
Wodrich
becomes The row Perhaps in Unicode zurückgegeben (space gewandelt)?

who knows itself with Unicode from and can time a Filterfunktion write?

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
08/01/05  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.565 Views

Untitledvor 0 min.

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie