English
Forum

RTF trouble

 

Georg
Hovenbitzer
Hello together,

I have here very Weird trouble.

The code under prepares, if not yet present, a RTF File and läd these at pressing of Go always into RichEdit area.
so far works too everything
If I now but z.B. row 1 write, Edit Window close, again open, whom whole Text delete, Window close and again open.
by then is everything O.k.

If I now a new Write text and the Edit Window schließe becomes this not any more stored
The vain rtf File is thereby always 128Bytes big !!!

make I there what wrong or goes The File at Save, if no Content present is, kapput ?!?

Greeting
Georg
CompileMarkSeparation
Declare Infofenster&
Declare Inforich&
Declare Infoend&
Declare Go&

Proc Infofenster

    Infofenster& = @Create(Window,%Hwnd,Infos,((%Maxx / 2) - 300),((%Maxy / 2) - 200),600,400)
    Inforich& = @Create(RichEdit,Infofenster&,,1,1,592,320)
    @Sendmessage(Inforich&,$45B,1,0)

    If @Fileexists(D:\RTFInfo.rtf)

        @Rtf(LoadRTF,Inforich&,D:\RTFInfo.rtf)

    Endif

    Infoend& = @Create(Button,Infofenster&,Beenden,259,328,82,22)
    @Setfocus(Inforich&)

Endproc

Proc Infosave

    @Rtf(SaveRTF,Inforich&,D:\RTFInfo.rtf)

Endproc

Cls
Go& = @Create(Button,%Hwnd,Go,100,100,80,40)

Whilenot %Key = 2

    Waitinput

    If @Clicked(Go&)

        Infofenster
        @Setfocus(Infofenster&)

    Elseif (@Clicked(Infoend&) And (@Getactivewindow() = Infofenster&))

        Infosave
        @Destroywindow(Infofenster&)
        @Setfocus(%Hwnd)

    Endif

Endwhile

../function-references/XProfan/end/'>End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
07/21/06  
 




Georg
Hovenbitzer
Hello together,

the trouble can z.B. so bypass:
CompileMarkSeparation
Declare Infofenster&
Declare Inforich&
Declare Infoend&
Declare Go&
Struct Gettextlengthex = Flags&,
Codepage&
Declare Gettextlengthex#
Dim Gettextlengthex#,Gettextlengthex

Proc Infofenster

    Infofenster& = @Create(Window,%Hwnd,Infos,((%Maxx / 2) - 300),((%Maxy / 2) - 200),600,400)
    Inforich& = @Create(RichEdit,Infofenster&,,1,1,592,320)
    @Sendmessage(Inforich&,$45B,1,0)

    If @Fileexists(D:\RTFInfo.rtf)

        @Rtf(LoadRTF,Inforich&,D:\RTFInfo.rtf)

    Endif

    Infoend& = @Create(Button,Infofenster&,Beenden,259,328,82,22)
    @Setfocus(Inforich&)

Endproc

Proc Infosave

    If @Sendmessage(Inforich&,$45F,,Gettextlengthex#,0) > 0

        @Rtf(SaveRTF,Inforich&,D:\RTFInfo.rtf)

    Else

        Assign #1,D:\RTFInfo.rtf
        Erase #1

    Endif

Endproc

Cls
Go& = @Create(Button,%Hwnd,Go,100,100,80,40)

Whilenot %Key = 2

    Waitinput

    If @Clicked(Go&)

        Infofenster
        @Setfocus(Infofenster&)

    Elseif (@Clicked(Infoend&) And (@Getactivewindow() = Infofenster&))

        Infosave
        @Destroywindow(Infofenster&)
        @Setfocus(%Hwnd)

    Endif

Endwhile

4 href='./../../function-references/XProfan/end/'>End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
07/21/06  
 




Georg
Hovenbitzer
Hello together,

could itself someone please times this code standing

The problem with the clear RTF File can I Yes bypass.
But if to the whole Translated crashes the program with of/ one Schutzverletzung ex.
and this always if it a RTF File with Content at Call the Fensters reading wants

have I here something utterly wrong understood ?!?!
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
07/25/06  
 




Rolf
Koch
Hi Georg,

versuchs time with folgendem:
[...] 
 
07/25/06  
 




Georg
Hovenbitzer
Hello Rolf,

many Thanks, but with the hint has it neither worked.

But if one with Control one RTF Edit prepares, works everything.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
07/25/06  
 




Sebastian
König
with Profan2Cpp funktionierts without crash - verkehrte world
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/25/06  
 




RGH
Georg Hovenbitzer
Hello Rolf,

many Thanks, but with the hint has it neither worked.

But if one with Control one RTF Edit prepares, works everything.


with which Control-row very works everything? If you these time postest, can I tappt im dunkeln with my code in XProfan vergleichen and Perhaps so the trouble on The track come.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
07/25/06  
 




Georg
Hovenbitzer
Hello Roland,

my response on Rolf was something voreilig.

with the row:
CompileMarkSeparation
@Control(RichEdit,,$5430D1C4,1,1,592,340,InfoFenster&,100,%hInstance,$210)
>

get I it in the Interpreter tidy running, but as EXE not any more
these in the but even first noticed, I me before already for a MultiEdit decided have.
The Hauptgrund was for, that one The functions on the rechten Mouse button directly has and not self Coden must.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
07/26/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.488 Views

Untitledvor 0 min.
H.Brill02/08/22
RudiB.11/24/21
Uwe Lang07/17/18
Peter Max Müller11/13/17

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