Italia
XProfEd - Opensource IDE

Allgemeine Editor Klassenfrage.

 
- Page 1 -



GDL
@ Hallo Roland,

Ich habe mir mit Aiuto deiner Klasse einen Einfachsteditor per mein Atmelprogramm gezimmert.
Es klappt auch alles wunderbar, bis auf Eines:Ich möchte immer den aktuelle Zeileninhalt in zeile$ haben.

Ich nehme mal an, dass das mit dem Teil zu tun hat.
KompilierenMarkierenSeparieren
Proc XSciProf.GetLine

    Return Int(.SciMessage(~SCI_LINEFROMPOSITION, .SciMessage(~SCI_GETCURRENTPOS, 0, 0), 0) + 1)

EndProc

Proc XSciProf.GetLine$

    Parameters Nr%, Z$
    Declare Len%, Zeile#
    Dim Zeile#,32767
    Len% = .SciMessage(~SCI_GETLINE, Nr%, Zeile#)
    Z$ = Translate$(Char$(Zeile#,0,Len%-1),	,Space$(XSciProf.Tab%))
    Dispose Zeile#
    Return Z$

Windows7 Xprofan 8,9,10 [...]  [...] 
21.10.2007  
 



 
- Page 2 -



Jörg
Sellmeyer
Alles klar, ich bin eh ne nachteule
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
24.10.2007  
 




GDL
Nun geht durch Zufall alles, wenn ich vor waitinput nen setfocus(edit&) einsetze.
KompilierenMarkierenSeparieren
Das es nun geht ist bestimmt nen Doppelfehler, der sich dann aufhebt.Wichtig iss, dass mein Zusammengesuche ausm Xprofed überhaupt geht.
Bin immer noch am Suchen warum das waitinput durchbrochen wird.Wird das in der XProfed Klasse schon festgelegt?

Servus
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
24.10.2007  
 




GDL
Habe noch weiter rumprobiert.

setfocus(edit&) oder setfocus(editor_&) kann nach waitinput ,in den einzelnen Abfragen,so oft stehen wie es mag, es geht nicht.Steht es aber vor waitinput geht alles.

Servus
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
24.10.2007  
 




GDL
@ Jörg,

habe mal alles soweit zusammengefasst,soweit ich bis jetzt bin.Die Exe ist lauffähig.Alle code liegen bei.Im Ordner 01test laufen lassen.

Servus
Georg

578 kB
Hochgeladen:24.10.2007
Downloadcounter98
Download
 
Windows7 Xprofan 8,9,10 [...]  [...] 
24.10.2007  
 




Jörg
Sellmeyer
GDL
Habe noch weiter rumprobiert.

setfocus(edit&) oder setfocus(editor_&) kann nach waitinput ,in den einzelnen Abfragen,so oft stehen wie es mag, es geht nicht.Steht es aber vor waitinput geht alles.

Servus
Georg


Du hättest es gar nicht nach einzelnen Abfragen setzen müssen, sondern nach der If-Struktur in der Hauptschleife.
KompilierenMarkierenSeparieren
While 1

    WaitInput

    If 1

        ...

    ElseIf 2

        ...

    ElseIf ...

        ...

    EndIf

    SetFocus(Editor&)

Wend


Ist aber letzendlich egal.
Ich würde nur die Variable editor_& nicht global definieren, sondern innerhalb der Prozedur. Dann müssen zwar alle weiteren, Prozeduren, die das Control beeinflussen noch in der ersten Zeile ein Parameters editor_&,...,... haben, aber Du hast dann die Prozeduren schön gekapselt und kannst bei Bedarf weitere Editcontrols in Deinem Programm erzeugen.
Deine Includedatei wird einfach flexibler.
Saluto
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
24.10.2007  
 



 
- Page 3 -



GDL
Habe das mit den Parameters nun gemacht.

Komme aber jetzt hier wieder nicht weiter.

Eine File laden geht einwandfrei.Möchte nun diese Proc dafür nutzen um auch makros zu laden.Diese sind einfache Textdateien.

Nur sollen diese Textdateien untereinander eingefügt werden und nicht immer als neue File.
Also lese ich die Anzahl der vorhandenen Zeilen aus und übergebe diese mit zei&.
KompilierenMarkierenSeparieren
proc makroladen

    Parameters File$,editor_&,zei&
    print str$(zei&)
    Declare Len&, Erg&, BDatei#
    Len& = FileSize(File$)
    Dim BDatei#, Len&  + 1       +1 für abschließendes Null-Byte
    BlockRead(File$, BDatei#,zei&, Len&)
    Byte BDatei#, Len& = 0
    statt: sendmessage(editor_&,~SCI_SETTEXT,0,BDatei#)
    sendmessage(editor_&,~SCI_SETTEXT,zei&,BDatei#)  geht nicht
    sendmessage(editor_&,~SCI_SETTEXT,zei&-1,BDatei#)  geht nicht
    sendmessage(editor_&,~SCI_SETSAVEPOINT, 0, 0)
    sendmessage(editor_&,~SCI_EMPTYUNDOBUFFER, 0, 0)
    Dispose BDatei#
    Erg& = 1

Windows7 Xprofan 8,9,10 [...]  [...] 
26.10.2007  
 



Du könntest wm_paste nutzen oder besser settext editor_&,gettext$(editor_&)+

+neuerInhalt$
 
26.10.2007  
 




GDL
ich habe es jetzt so gelöst: ich kopiere die datei in die Zwischenablage und setzte es dann mittels Einfügen in das Dokument.
 
Windows7 Xprofan 8,9,10 [...]  [...] 
26.10.2007  
 




GDL
Posting hat sich überschnitten.
 
Windows7 Xprofan 8,9,10 [...]  [...] 
26.10.2007  
 




GDL
Dies alles nur, weil ich meine Modellbahnsteuerung DCC kompatibel gemacht habe.
Mir allein hätte mein rtf Gewurstel auch gelangt.
 
Windows7 Xprofan 8,9,10 [...]  [...] 
26.10.2007  
 




Jörg
Sellmeyer
Hallo Georg,
Sieh Dir mal das hier von Andreas Miethe an:
[web]https://www.rgh-soft.de/forum01/read.php?f=7&i=12314&t=12260#reply_12314[/web]
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
26.10.2007  
 




GDL
@Jörg,

habe deinen Vorschlag mit den Parameters übernommen.RVKcompiler erstrahlt demnächst Anwenderfreundlich als Untermodul in meinem Modellbahnsteuerungsprogramm.Es wird zum Programmieren der Atmel Mikrokontroller necessario.

Die inc
KompilierenMarkierenSeparieren
 {$CQ}
 $H XPrfEdit.ph			Ausremmen wenn nicht XPSE
Declare KeyWord1$, KeyWord2$, KeyWord3$, KeyWord4$, KeyWord5$, KeyWord6$, Keyword7$, Keyword8$
Declare Par1$, Par2$,size%,editordll&,e_cBefehl&,e_cbBefehlChk%,tab%
declare e_cAktuell&,e_cNormal&,e_cPapier&,e_cKommentar&,e_cbKommentarChk%
declare e_cZahl&,e_cbZahlChk%,e_cStrings&,Font$, KeyWord$, Key$, Wert$
declare e_cbStringsChk%,e_cOperator&,e_cbOperatorChk%,e_cBezeichner&,e_cbBezeichnerChk%
declare e_cDirekt&,e_cbDirektChk%,e_cFunktion&,e_cbFunktionChk%
declare e_cSysvar&,e_cbSysvarChk%,e_cStruktur&,e_cbStrukturChk%
Struct TextRange = cpMin&,
cpMax&,
lpstrText&
editordll& = UseDLL(SciLexer.dll)

IfNot editordll&

    MessageBox(SciLexer.dll nicht gefunden!,FEHLER,16)

EndIf

standardwerte
==============================================================

proc standardwerte

    size%=10
    font$=Courier New
    Tab%        = 8
    e_cNormal&    = RGB($00,$00,$00)
    e_cAktuell&   = RGB($FF,$FF,$00)
    e_cKommentar& = RGB($FF,$00,$00)
    e_cZahl&      = RGB(0,0,255)
    e_cFunktion&  = RGB($00,$00,$80)
    e_cStrings&   = RGB(0,206,0)
    e_cOperator&  = RGB(214,18,239)
    e_cStruktur&  = RGB($00,$00,$00)
    e_cBefehl&    = RGB($00,$00,$DD)
    e_cPapier&    = RGB($FF,$FF,$FF)
    e_cBezeichner&= RGB($00,$00,$00)
    e_cSysvar&    = RGB(214,18,111)
    e_cDirekt&    = RGB($FF,$00,$00)
    e_cbKommentarChk% = 0
    e_cbZahlChk%      = 0
    e_cbFunktionChk%  = 1
    e_cbStringsChk%   = 0
    e_cbOperatorChk%  = 0
    e_cbStrukturChk%  = 1
    e_cbBefehlChk%    = 1
    e_cbBezeichnerChk%= 0
    e_cbSysvarChk%    = 1
    e_cbDirektChk%    = 1

endproc

========================================================================

proc neues_edit

    declare editor_&
    parameters _x%,_y%,_b%,_h%,_eltern&
    editor_& = Control(Scintilla, , ~WS_CHILD | ~WS_VISIBLE,_x%,_y%,_b%,_h%,_eltern&,4000,%hInstance,0)
    sendMessage(editor_&,~SCI_USEPOPUP, 0, 0)
    sendMessage(editor_&,~SCI_SETTABWIDTH,tab%, 0)
    sendMessage(editor_&,~SCI_SETUSETABS, 0, 0)
    sendMessage(editor_&,~SCI_SETINDENT,tab%, 0)
    sendMessage(editor_&,~SCI_SETTABINDENTS, 1, 0)
    sendMessage(editor_&,~SCI_SETBACKSPACEUNINDENTS, 1, 0)
    sendMessage(editor_&,~SCI_STYLESETFONT, 32, Addr(Font$))
    sendMessage(editor_&,~SCI_STYLESETSIZE, 32,Size%)
    sendMessage(editor_&,~SCI_STYLECLEARALL, 0, 0)
    Font$ = Arial + Chr$(0)
    sendMessage(editor_&,~SCI_STYLESETFONT,~STYLE_LINENUMBER, Addr(Font$))
    sendMessage(editor_&,~SCI_STYLESETSIZE,~STYLE_LINENUMBER,Size% - 4)
    sendMessage(editor_&,~SCI_SETMARGINTYPEN,1,~SC_MARGIN_NUMBER)
    sendMessage(editor_&,~SCI_SETMARGINWIDTHN,1,50)
    Interne Tastaturfunktionen abklemmen (Tastenfunktionen werden anderweitig genutzt)
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 13, 0)   Enter
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 70 + ~SCMOD_CTRL << 16, 0)   f + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 70 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   F + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 71 + ~SCMOD_CTRL << 16, 0)   g + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 71 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   G + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 72 + ~SCMOD_CTRL << 16, 0)   h + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 72 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   H + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 73 + ~SCMOD_CTRL << 16, 0)   i + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 73 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   I + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 76 + ~SCMOD_CTRL << 16, 0)   l + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 76 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   L + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 77 + ~SCMOD_CTRL << 16, 0)   l + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 77 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   M + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 79 + ~SCMOD_CTRL << 16, 0)   o + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 79 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   O + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 82 + ~SCMOD_CTRL << 16, 0)   r + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 82 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   R + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 83 + ~SCMOD_CTRL << 16, 0)   s + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 83 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   S + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 84 + ~SCMOD_CTRL << 16, 0)   t + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 84 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   T + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 87 + ~SCMOD_CTRL << 16, 0)   w + Strg
    sendMessage(editor_&,~SCI_CLEARCMDKEY, 87 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0)   W + Strg
    Lexer auswählen und mit Keywords bestücken
    sendMessage(editor_&,~SCI_SETLEXER, 79, 0)
    KeyWord1$ = add addfiles addfonts addhotkey addstring addwindows append appendmenu
    + appendmenubar arc assign beep blockwrite byte
    + char checkmenu chdir chord clear
    + clearclip clearlist cliploadbmp close cls color
    + copy copybmp copybmptomem copypic copysizedbmp copysizedpic createmenu
    + ddelink ddeexecute ddeterminate debugout dec declare
    + deleteobject dim dim! dim$ dim% dim& dispose
    + drawicon drawextbmp drawexticon drawlibicon drawpic drawsizedextbmp
    + drawsizedpic drawsysicon drawtext ellipse enablemenu enablewindow endpaint endprint
    + endsub erase execute exitwindows float fill font freedll
    + inc input input# insertmenu killtimer let line lineto listboxitem$
    + list! list$ list% list& loadbmp loadsizedbmp locate logout long
    + mcls mcopybmp mcopysizedbmp mloadbmp mkdir moveto music nextpage
    + orientation openrw outp outpb parameters password pie play playsound
    + popup print print# putbyte putchar putclip putlong putword randomize readtext
    + rectangle removemenu rename repaint reset return rewrite
    + rmdir roundrect run savebmp savebmptoclip screen screencopy
    + seek separator setcheck setclosemsg setdialogfont setfattr setfont
    + setmenuitem setpixel setscrollrange setscrollpos setstyle settext settimer
    + setwindowpos shell showcursor showmax showmin shownormal sleep
    + sound sqldone sqlexec startpaint startprint string sub
    + subpopup tbox textcolor traceon traceoff trackmenu usebrush
    + usecursor useextcursor useextmenu usefont useicon usepen usermessages
    + var wincopy window windowstyle windowtitle winhelp word writeini + Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 1, Addr(KeyWord1$))
    KeyWord2$ = .super abs addr addstring ansitooem$ arctan assign bin$ blockread byte call char$
    + choosedir$ chr$ classof clicked closecom comerror control cos cot create
    + ctod$ date$ db del$
    + deletestring destroywindow direxists diskfree disksize double dtoc$
    + editbox eof exp external extstring$ float fileexists filename$ filesearch$
    + filestatus$ filepos filesize findfirst$ findnext$ findwindow format$
    + ftp get getactivetab getactivewindow getbvalue getbyte getchar$ getcheck
    + getclip$ getcount getcursel getdir$ getenv$ getfattr getfdate$
    + getfilesize getfocus getftime$ getgvalue gethandle getkey$ getline$
    + getlinecount getlong getpixel getrvalue getselcount getscrollpos getstate getstring$ getstyle gettext$ getword height
    + hex$ hiword iconcount if inkey$ inp inpb input$ ins$ insertstring
    + inserttab instr int iskey itemid joy keyin left$ len lg list!
    + list$ list% list& listbox$ listboxitem$ ln loadfile$ loadpic loadsizedpic long longname$
    + lower$ loword makelong match$ mcisend$ mempos menuitem messagebox mid$ mkstr$ mouse
    + movearrtolist movehandletolist
    + movelisttoarr movelisttohandle movelisttomem movelisttostr$ movestrtolist new not oct$
    + oemtoansi$ opencom ord ogl par$ pi postmessage procaddr ptype$ pwd$ readcom$ readini$
    + rgb right$ rnd round rtf savefile$ scankey scrn selectstring sendkey
    + sendmessage sendstring set setactivewindow setbit setcom setcomext
    + setcomtimeouts setfocus shellexec shortname$ showwindow smtp
    + sin single sizeof space$ sqlinit sqr sqrt str$ string$ substr$
    + tab tabchanged tan testbit time$ tmouse toolbar translate$ trim$
    + typeof upper$ usedll val width winerror$ winexec winexecwait word writecom xor + Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 2, Addr(KeyWord2$))
    KeyWord3$ = asmstart asmend asminclude break case casenot caseof continue class def else elseif
    + endif end endselect endproc endwhile endwith errorproc getmessage if ifnot otherwise
    + proc progend rem repeat select struct subproc until waitinput waitkey waitmouse waitscan
    + while whilenot whileloop with + Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 0, Addr(KeyWord3$))
    KeyWord4$ = !input %bitspixel %bmpx %bmpy %button %childmessage %csrlin %cycaption %cymenu %dbdeleted %dbeof %dbfcount
    + %dbfdecs %dbflen %dbfnumber %dbheader %dbmemo %dbrecsize %dbversion %ddewin %desktop
    + %dlgproc %dlgwproc %dos16 %dos32 %errnumber %error %errorlevel %font %ftpconnected %ftpstatus %getcount
    + %getcursel %getfocus %getinputstate %hdc %hdc2 %input %hinstance &hmenu %hwnd %input %ioresult
    + %itemid %key %lastmessage %lfn %linux %matchlen %matchpos %maxx %maxy %mcierror %menuitem
    + %message %mousekey %mousepressed %mousex %mousey %mwnd %notifycode %os2
    + %parcount %pcount %peekmessage %pos %printing %progend %scankey %umessage %win16
    + %win32 %winbottom %winerror %windowstyle %winleft %winright %wintop %winver %wmnotify %wmpaint
    + %wmtimer &bmpcol &dbreccount &dbrecno &gettickcount &input &lastfocus &loop &lparam &memdc &notifywnd
    + &pdc &sqlcount &sqldbc &ulparam &uwparam &winproc &windproc &wparam + chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 3, Addr(KeyWord4$))
    KeyWord5$ = $dbfname $dbftype $dblupdate $dblupdate4 $dosver $drive $ftpstatus $errfile $errstr
    + $getinput $gettext $input $match $profver $progdir $sqlenv $sqlerror $syspath $tempdir
    + $winpath $winver+chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 4, Addr(KeyWord5$))
    Keyword6$=aaa aad aam aas adc add and arpl bound bsf bsr bswap bt btc btr bts call cbw cdq clc cld cli clts
    + cmc cmova cmovb cmovc cmove cmovg cmovl cmovo cmovp cmovs cmovz cmovna cmovnb cmovnc cmovne cmovng cmovnl cmovno
    + cmovnp cmovns cmovnz cmovae cmovbe cmovge cmovle cmovpe cmovpo cmovnae cmovnbe cmovnge cmovnle cmp cmpsb cmpsd cmpsw
    + cmpxchg cmpxchg8B cpuid cwd cwde daa das dec div enter hlt idiv imul in inc insb insd insw int int03 int3 into invd
    + invlpg iret iretd iretw ja jb jc je jg jl jo jp js jz jna jnb jnc jne jng jnl jno jnp jns jnz jae jbe jge jle jpe
    + jpo jnae jnbe jnge jnle jcxz jecxz jmp lahf lar lds lea leave les lfs lgdt lgs lidt lldt lmsw lock lodsb lodsd lodsw
    + loop loope loopne loopnz loopz lsl lss ltr mov movsb movsd movsw movsx movzx mul neg nop not or out outsb outsd outsw
    + pop popa popad popaw popf popfd popfw push pusha pushad pushaw pushf pushfd pushfw rcl rcr rdmsr rdpmc rdtsc rep repe
    + repne repnz repz ret retf retn rol ror sahf sal sar sbb scasb scasd scasw seta setb setc sete setg setl seto setp
    + sets setz setna setnb setnc setne setng setnl setno setnp setns setnz setae setbe setge setle setpe setpo setnae
    + setnbe setnge setnle sgdt shl shld shr shrd sidt sldt smint smintold smsw stc std sti stosb stosd stosw str sub syscall
    + sysenter sysexit sysret test verr verw wait wbinvd wrmsr xadd xchg xlatb xor .186 .286 .386 .486 .586 .686 .8086 .8087
    + .alpha .break .code .const .continue .cref .data .data? .dosseg .else .endif .endw .err .err2 .errb .errdef .errdif
    + .errdifi .erre .erridn .erridni .errnb .errndef .errnz .exit .if .k3d .lall .lfcond .list .listall .listif .listmacro
    + .listmacroall .mmx .model .no87 .nocref .nolist .nolistmacro .radix .repeat .sall .seq .sfcond .stack .startup .tfcond
    + .type .until .untilcxz .while .xall .xcref .xlist .xmm __FILE__ __LINE__ abs alias align assume bits byte byte catstr
    + class code comm comment common data db dd df dosseg dq dt dw dword echo else elseif elseif2 end endif endm endp ends equ
    + even exitm extern externdef extrn for forc fword goto group if if2 ifb ifdef ifdif ifdifi ife ifidn ifidni ifndef include
    + includelib instr invoke irp irpc label macro name option org %out oword page popcontext proc proto public purge
    + pushcontext qword real4 real8 real10 record repeat rept sbyte sdword segment sizestr struc struct substr subtitle
    + subttl sword tbyte textequ title typedef union while word+Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 5, Addr(KeyWord6$))
    Keyword7$=!( %( &( $( add$ add( addchoice and( charset closerw
    + createwindow createtext createedit createmultiedit createdialog createextdialog createvscroll
    + createhscroll createchoicebox createsortedlistbox createlistbox createicon creategroupbox
    + createbutton createdefbutton createcheckbox createradiobutton createfont
    + dbappendblank dbbrowse dbclose dbcreate dbcreateindex dbdelete dbedit dbfind
    + dbget$ dbgetfield dbgetmemo dbgo dbindex dbopen dbpack dbput
    + dbputfield dbputmemo dbputrec dbseek dbsetmemowidth dbundelete dbuse
    + decimals deletechoice div div& equ equ$ filemode goto gosub gt gt$ %lfn lt lt$
    + mod( movelisttochoice movelisttoedit movelisttolist mul neq neq$
    + numwidth or( pow setautopaint seterrorlevel setlfn settruecolor
    + sqlsetnull sqlsetdel strwidth sub( wend+Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 6, Addr(KeyWord7$))
    Keyword8$=setlfn getusage+Chr$(0)
    sendMessage(editor_&,~SCI_SETKEYWORDS, 7, Addr(KeyWord8$))
    Farben einstellen
    editor_farben (editor_&)
    Folding einstellem
    sendMessage(editor_&,~SCI_SETSTYLEBITS,5)
    Par1$ = foldz : Par2$ = 1z
    sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
    Par1$ = fold.compactz : Par2$ = 0z
    sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
    Par1$ = fold.commentz : Par2$ = 0z
    sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
    Par1$ = fold.preproccessorz : Par2$ = 0z
    sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
    sendMessage(editor_&,~SCI_SETMARGINWIDTHN, 2, 0)
    sendMessage(editor_&,~SCI_SETMARGINTYPEN,2,~SC_MARGIN_SYMBOL)
    sendMessage(editor_&,~SCI_SETMARGINMASKN, 2,~SC_MASK_FOLDERS)
    sendMessage(editor_&,~SCI_SETMARGINWIDTHN, 2,20)
    Choose folding icon colours
    sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDER, $FFFFFF)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDER, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEROPEN, $FFFFFF)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEROPEN, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEROPENMID, $FFFFFF)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEROPENMID, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEREND, $FFFFFF)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEREND, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERSUB, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERTAIL, $FF0000)
    sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERMIDTAIL, $FF0000)
    sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDER, ~SC_MARK_BOXPLUS)         PROC geschlossen
    sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEROPEN, ~SC_MARK_BOXMINUS)    PROC geöffnet
    sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEREND, ~SC_MARK_BOXPLUSCONNECTED)

    PROC geschlossen innerhalb PROC

        sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERMIDTAIL, ~SC_MARK_TCORNER)  ENDPROC innerhalb PROC
        sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEROPENMID, ~SC_MARK_BOXMINUSCONNECTED)

        PROC geöffnet innerhalb PROC

            sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERSUB, ~SC_MARK_VLINE)        zw. PROC und ENDPROC
            sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERTAIL, ~SC_MARK_LCORNER)     ENDPROC
            sendMessage(editor_&,~SCI_SETFOLDFLAGS, 16, 0)                                        Draw line below if not expanded
            sendMessage(editor_&,~SCI_SETMARGINSENSITIVEN, 2, 1)
            Fertig!
            ShowWindow(editor_&, 1)
            return editor_&

        endproc

        ===================================================================

        proc editor_farben

            parameters editor_&
            Case e_cAktuell& = e_cNormal& : e_cAktuell& = $FFFFFF - e_cNormal&
            ALle Farben auf die Standardfarbe setzen
            sendmessage(editor_&,~SCI_STYLESETFORE, 32, e_cNormal&)
            sendmessage(editor_&,~SCI_STYLESETBACK, 32, e_cPapier&)
            sendmessage(editor_&,~SCI_STYLECLEARALL, 0, 0)

            If e_cAktuell& <> e_cPapier&

                sendmessage(editor_&,~SCI_SETCARETLINEVISIBLE, 1, 0)
                sendmessage(editor_&,~SCI_SETCARETLINEBACK, e_cAktuell&,0)  Hintergreund aktuelle Zeile

            Else

                sendmessage(editor_&,~SCI_SETCARETLINEVISIBLE,0,0)

            EndIf

            Spezielle Farben setzen
            sendmessage(editor_&,~SCI_STYLESETFORE, 1, e_cKommentar&)    Comment
            sendmessage(editor_&,~SCI_STYLESETBOLD, 1, e_cbKommentarChk%)
            sendmessage(editor_&,~SCI_STYLESETITALIC, 1, 1)
            sendmessage(editor_&,~SCI_STYLESETFORE, 2, e_cZahl&)         Number
            sendmessage(editor_&,~SCI_STYLESETBOLD, 2, e_cbZahlChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 4, e_cStrings&)      Strings
            sendmessage(editor_&,~SCI_STYLESETBOLD, 4, e_cbStringsChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 19, e_cStrings&)  UnderlineStrings
            sendmessage(editor_&,~SCI_STYLESETUNDERLINE, 19, 1)  UnderlineStrings
            sendmessage(editor_&,~SCI_STYLESETBOLD, 19, 1 - e_cbStringsChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 6, e_cOperator&)     Operator
            sendmessage(editor_&,~SCI_STYLESETBOLD, 6, e_cbOperatorChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 8, e_cBezeichner&)   Variablen
            sendmessage(editor_&,~SCI_STYLESETBOLD, 8, e_cbBezeichnerChk%)
            XProfan-Sprachumfang in fett
            sendmessage(editor_&,~SCI_STYLESETFORE, 5, e_cDirekt&)       Direktiven
            sendmessage(editor_&,~SCI_STYLESETBOLD, 5, e_cbDirektChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 3, e_cFunktion&)     Funktion
            sendmessage(editor_&,~SCI_STYLESETBOLD, 3, e_cbFunktionChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 15, e_cSysvar&)      Systemvariablen
            sendmessage(editor_&,~SCI_STYLESETBOLD, 15, e_cbSysvarChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 10, e_cStruktur&)    Struktur
            sendmessage(editor_&,~SCI_STYLESETBOLD, 10, e_cbStrukturChk%)
            sendmessage(editor_&,~SCI_STYLESETFORE, 11, e_cBefehl&)      Befehle
            sendmessage(editor_&,~SCI_STYLESETBOLD, 11, e_cbBefehlChk%)
            Asseembler
            sendmessage(editor_&,~SCI_STYLESETFORE, 14, e_cSysvar&)      Systemvariablen
            Veraltete Keywords
            sendmessage(editor_&,~SCI_STYLESETBACK,  9, $00FFFF)                überholt = gelb
            sendmessage(editor_&,~SCI_STYLESETBACK, 17, $0000FF)                veraltet = rot
            sendmessage(editor_&,~SCI_STYLESETFORE, ~STYLE_LINENUMBER, 0)

        endproc

        ================================================================

        proc einfuegen_

            parameters editor_&
            Return sendmessage(editor_&,~SCI_PASTE, 0, 0)

        endproc

        ==========================================================

        Proc editloeschen_

            parameters editor_&
            Return sendmessage(editor_&,~SCI_CLEARALL, 0, 0)

        EndProc

        ========================================================

        Proc ausschneiden_

            parameters editor_&
            Return sendmessage(editor_&,~SCI_CUT, 0, 0)

        EndProc

        ===================================================

        Proc kopieren_

            parameters editor_&
            Return sendmessage(editor_&,~SCI_COPY, 0, 0)

        EndProc

        ===================================================

        Proc laden_

            Parameters File$,editor_&
            Declare Len&, Erg&, BDatei#
            Len& = FileSize(File$)
            Dim BDatei#, Len&  + 1       +1 für abschließendes Null-Byte
            BlockRead(File$, BDatei#, 0, Len&)
            Byte BDatei#, Len& = 0
            sendmessage(editor_&,~SCI_SETTEXT, 0, BDatei#)
            sendmessage(editor_&,~SCI_SETSAVEPOINT, 0, 0)
            sendmessage(editor_&,~SCI_EMPTYUNDOBUFFER, 0, 0)
            Dispose BDatei#
            Erg& = 1
            Return Erg&

        EndProc

        ===========================================================

        Proc speichern_

            Parameters File$,editor_&
            Declare Len&, BDatei#
            len&=sendmessage(editor_&,~SCI_GETLENGTH,0,0)+1
            case len&=0:beep
            case len&=0:len&=100000
            Dim BDatei#,Len&
            sendmessage(editor_&,~SCI_GETTEXT, Len&, BDatei#)
            BlockWrite File$, BDatei#, 0, Len&
            Dispose BDatei#

        EndProc

        ===================================================================

        Proc aktuellezeile_

            parameters editor_&
            Return Int(sendmessage(editor_&,~SCI_LINEFROMPOSITION,sendmessage(editor_&,~SCI_GETCURRENTPOS, 0, 0), 0) + 1)

        EndProc

        =======================================================

        Proc retur_

            parameters editor_&
            Return sendmessage(editor_&,~SCI_UNDO, 0, 0)

        EndProc

        ======================================================================

        Proc GetLine$_

            Parameters Nr%,Z$,editor_&
            Declare Len%, Zeile#
            Dim Zeile#,32767
            Len% = .SciMessage(~SCI_GETLINE, Nr%, Zeile#)
            Len% = sendmessage(editor_&,~SCI_GETLINE,Nr%,Zeile#)
            Z$ = Char$(Zeile#,0,Len%-1)
            dispose zeile#
            return z$

        endproc

        ========================================================

        proc freieditordll_

            FreeDLL editordll&

        endproc

        ==============================================================

        Proc anzahl_zeilen

            parameters editor_&
            Return sendmessage(editor_&,~SCI_GETLINECOUNT,0,0)

        EndProc

        =============================================================

        Proc suchmarke

            Cursor ganz nach oben
            Parameters editor_&,Text$,bWord%,bCase%,Direction%
            sendmessage(editor_&,~SCI_GOTOLINE,0,0)
            Declare Flag%, ZText$, Erg&, P&

            If Direction% = 0

                P& = sendmessage(editor_&,~SCI_GETSELECTIONEND, 0, 0)

            Else

                P& = sendmessage(editor_&,~SCI_GETSELECTIONSTART, 0, 0) - 1

            EndIf

            sendmessage(editor_&,~SCI_SETSEL, P&, P&)
            Case bWord% : Flag% = Flag% + ~SCFIND_WHOLEWORD
            Case bCase% : Flag% = Flag% + ~SCFIND_MATCHCASE
            sendmessage(editor_&,~SCI_SEARCHANCHOR, 0, 0)
            ZText$ = Text$ + chr$(0)

            If Direction% = 0

                Erg& = sendmessage(editor_&,~SCI_SEARCHNEXT, Flag%, Addr(ZText$))

            Else

                Erg& = sendmessage(editor_&,~SCI_SEARCHPREV, Flag%, Addr(ZText$))

            EndIf

            If Erg& <> - 1

                if not(sendmessage(editor_&,~SCI_GETLINEVISIBLE, aktuellezeile_(editor_&), 0))   gefaltet

                    sendmessage(editor_&,~SCI_TOGGLEFOLD, aktuellezeile_(editor_&), 0)

                endif

                sendmessage(editor_&,~SCI_SETYCARETPOLICY, ~CARET_SLOP, 10)
                sendmessage(editor_&,~SCI_SCROLLCARET,0,0)
                sendmessage(editor_&,~SCI_SETYCARETPOLICY, ~CARET_EVEN, 0)

            EndIf

            Return Erg&

        EndProc

        ======================================<
=====================
 
Windows7 Xprofan 8,9,10 [...]  [...] 
26.10.2007  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Topic-Options

14.017 Views

Untitledvor 0 min.
Sven Bader14.03.2023
Ernst22.04.2016
Magda31.08.2014
GDL11.05.2014
Di più...

Themeninformationen

Dieses Thema hat 4 subscriber:

GDL (21x)
Jörg Sellmeyer (7x)
iF (2x)
RGH (1x)


Admins  |  AGB  |  Applications  |  Autori  |  Chat  |  Informativa sulla privacy  |  Download  |  Entrance  |  Aiuto  |  Merchantportal  |  Impronta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Giochi  |  Cerca  |  Support

Ein Projekt aller XProfaner, die es gibt!


Il mio XProfan
Private Notizie
Eigenes Ablageforum
Argomenti-Merkliste
Eigene Beiträge
Eigene Argomenti
Zwischenablage
Annullare
 Deutsch English Français Español Italia
Traduzioni

Informativa sulla privacy


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie