Forum | | | | - Page 1 - |
| Thomas Freier | any Eigenversuche hit[ed] fehl. has of/ one a suggestion, How two RTFs fester Size and a Dritte discretionary long ausgedruckt go can. Analog one Example of Uwe 'Pascal' becomes here only a Page printed. but How geht's moreover? CompileMarkSeparation $H Windows.ph
$H RichEdit.ph
$U RTFHandling.pcu = R_'RTF-PCU einbinden
$U objects.pcu = R_
proc DrawRichText2'---------------------------------------------------------DrawRichText2
parameters RTF&,PosX%,PosY%,MaxX%,MaxY%'--Position + Grösse in Pixeln!
declare PrinterDpiX%,PrinterDpiY%
declare WindowDpiX%,WindowDpiY%
declare fx!,fy!
if %printing'--Bei Druck: %HDC2 = %HDC = &PDC
~SetMapMode(%hdc2,1)
~SetWindowExtEx(%hdc2,1,1,0)
~SetViewPortExtEx(%hdc2,1,1,0)
PosX%=PosX%+30'--Korrektur ???
PosY%=PosY%+30'--Korrektur ???
endif
PrinterDpiX%=~GetDeviceCaps(%hdc2,~LOGPIXELSX)'--dpi X des Druckers
PrinterDpiY%=~GetDeviceCaps(%hdc2,~LOGPIXELSY)'--dpi X des Druckers
WindowDpiX%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSX)'--dpi X des Bildschirms (!)
WindowDpiY%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSY)'--dpi Y des Bildschirms (!)
PosX%=int(PosX%/WindowDpiX%*1440)
PosY%=int(PosY%/WindowDpiX%*1440)
MaxX%=int(MaxX%/WindowDpiX%*1440)
MaxY%=int(MaxY%/WindowDpiX%*1440)
declare Range#
dim Range#,48
clear Range#
long Range#, 0=%hdc2,%hdc2
long Range#, 8=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,24=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,44=-1
sendmessage(RTF&,~EM_FORMATRANGE,1,Range#)
if %printing
fx!=~GetDeviceCaps(%hdc2,~LOGPIXELSX)/300
fy!=~GetDeviceCaps(%hdc2,~LOGPIXELSY)/300
~SetMapMode(%hdc2,~MM_ANISOTROPIC)
~SetWindowExtEx(%hdc2,6400,9600,0)
~SetViewPortExtEx(%hdc2,int(2200*fx!),int(3300*fy!),0)
endif
dispose Range#
casenot %printing:repaint
endproc'---------------------------------------------------------------------------------
window 0,0-%maxX,800
var rtf_dll& = R_INTITFORCREATERTF()'DLL laden mit PCU
var _RichEdit& = R_CREATERICHEDIT(%hwnd,"",70,0,350,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",_RichEdit&,"Bootsplatz.rtf")
var __RichEdit& = R_CREATERICHEDIT(%hwnd,"",480,0,280,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",__RichEdit&,"Label 105x42.rtf")
var RichEdit& = R_CREATERICHEDIT(%hwnd,"",0,102,800,400,9000)' Richedit erstellen mit PCU
var rtf_hdc& = R_PREPAREFORLINEBREAK(RichEdit&)' Device Context erzeugen mit PCU
R_Init_object(RichEdit&)'Zum Bildempfang vorbereiten
RTF("LoadRTF",RichEdit&,"Bilder-Album.rtf")
startprint "*xx"
DrawRichText2 _RichEdit&,80,10,400,150
DrawRichText2 __RichEdit&,500,10,250,150
DrawRichText2 RichEdit&,0,150,800,14900
endprint
waitkey
R_DEINITRTF(RichEdit&,rtf_hdc&,rtf_dll&)'RTF-Aufräumen
R_DEINITRTF(_RichEdit&,rtf_hdc&,rtf_dll&)
R_DEINITRTF(__RichEdit&,rtf_hdc&,rtf_dll&)
R_DeInit_object()'RTF-Aufräumen<
End
remainder in the zipper. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/12/10 ▲ |
| |
| | | | - Page 2 - |
| | « this Posting watts as Solution marked. » | | - Page 2 - |
| Uwe ''Pascal'' Niemeier | Hi Thomas!
means is "RTF in RTF by OLE" für's Print out already time OK? and it fails on it, that the eingebetteten RTFs (The together Yes so 'ne manner Briefkopf form) not machine go can, if no Word present is?
have with the the Print time getestet; though only MS Image Writer, because I momentarily none "echten" printer available have. sees exakt so from How by Wordpad ausgedruckt. ought to means useable his. See attachment.
with the Edit without Word: time see...
another word to the code at the beginning this Threads: The watts original develops, for a Image during the Druckens into document without OLE-Support einzublenden. therefore find itself therein different APIs to Größenanpassung, The to that Print reiner documents (with OLE) not necessary are (hope I at least).
SeeYou Pascal |
| | | | | |
| | | Have what hinbekommen, druckt by me correctly on the 1. Page 3 RTFs and on further pages only 1 RTF:
(Have dispose fr# in the function forget, Please nachtragen) |
| | | | |
| | Thomas Freier | hey, sees with the first Test that's all right from. thanks for Help. will be today time ausloten where The border are. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/14/10 ▲ |
| |
| | Uwe ''Pascal'' Niemeier | Hi Thomas!
background is, if MS Word on the System is, can man further RTFs into master-RTF einbetten and too Edit and then too everything print
the goes too under Profan with OLE-Support of Dieter or me! is Perhaps yet plainer as the Übereinanderlegen more Files in the printer-DC?
if not, become You probably two Druckroutinen brauchen; a for 1. Page with Overlays and a with Loop for Folgeseiten without Overlays. it must even only gewährleistet his. the routine 2 there starting To print, where routine 1 quit has (even the change of Page 1 To 2).
SeeYou Pascal |
| | | | |
| | Thomas Freier | hey Pascal,
we talk here naturally of XProfan and your, or. Dieters, OLE-Objects. If MS-Office No is, wished I on a Scoll-area The master-RTF and two further on The master-RTF as Subproc-element lay. in the momentum be I yet on the Search, How undergo I, which Objekt in the RTF the users klicked has. have yet nothing found and no idea. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/14/10 ▲ |
| |
| | Uwe ''Pascal'' Niemeier | Hi Thomas!
means is "RTF in RTF by OLE" für's Print out already time OK? and it fails on it, that the eingebetteten RTFs (The together Yes so 'ne manner Briefkopf form) not machine go can, if no Word present is?
have with the the Print time getestet; though only MS Image Writer, because I momentarily none "echten" printer available have. sees exakt so from How by Wordpad ausgedruckt. ought to means useable his. See attachment.
with the Edit without Word: time see...
another word to the code at the beginning this Threads: The watts original develops, for a Image during the Druckens into document without OLE-Support einzublenden. therefore find itself therein different APIs to Größenanpassung, The to that Print reiner documents (with OLE) not necessary are (hope I at least).
SeeYou Pascal |
| | | | |
| | Thomas Freier | hey Pascal,
with the Edit without Word: time see...
if with the XProfan possible would, is the the gavel. have time one Minibeispiel zusammengestellt. here remaining naturally only The Possibility everything (target & site) in a INI To pack around the three erstellten and gespeicherten RTFs again new To loading. is naturally not for a Disclosure suitable. CompileMarkSeparation $H Include/Windows.ph
$H Include/Messages.ph
$H Include/commctrl.ph
$H Include/RichEdit.ph
' NUR mit der RTF.PCU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ für Bilder und OLE-Objekte aktivieren
$U Include/RTFHANDLING.PCU=R_
$U Include/OBJECTS.PCU=R_
var pcu_dll& = R_INTITFORCREATERTF()'DLL laden mit PCU
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
declare __cfObj&,__cf0&,__cf1&,__cf2&,__cf3&,__cf4&,__cf5&,__cf6&,__cf7&,__cf8&,__cf9&,__cfS_10&,__cf11&,__cf12&,__cf13&,__cf14&,__cf15&,__cf16&,__cf17&,__cf18&,__cf19&,__cf20&,__cf21&,__cf22&,__cf23&,__cf24&,__cf25&,__cf26&,__cf27&,__cfS_28&,__cfS_29&,__cfS_30&,__cfS_31&,__cfS_32&,__cfS_33&,__cfS_34&,__cfS_35&,__cfS_36&,__cfS_37&,__cfS_38&,__cfS_39&,__cfS_40&,__cfS_41&,__cf42&,__cfS_43&,__cfS_44&,__cf45&,__cf46&
var __cfMode&=0
var __cfdll1&=USEDLL("WINMM.DLL")
def __cf1(2) !"KERNEL32","GetProcAddress"
def __cf2(1) !"KERNEL32","GetModuleHandleA"
__cf0&=0
__cf1&=__cf1(__cf2("KERNEL32"),"GlobalAlloc")
__cf2&=__cf1(__cf2("KERNEL32"),"GlobalFree")
__cf3&=__cf1(__cf2("KERNEL32"),"GlobalSize")
__cf4&=0
__cf5&=__cf1(__cf2("WINMM"),"timeGetTime")
__cf6&=__cf1(__cf2("KERNEL32"),"RtlMoveMemory")
__cf7&=__cf1(__cf2("KERNEL32"),"ExitProcess")
__cf8&=0 : CASE __cfMode& : __cf8&=__cf3("__xeEOP")
__cf9&=__cf1(__cf2("USER32"),"MessageBoxA")
__cfS_10&=__cfStaticS("")
__cf11&=__cf1(__cf2("KERNEL32"),"Sleep")
__cf12&=0
__cf13&=__cf1(__cf2("USER32"),"IsWindow")
__cf14&=__cf1(__cf2("NTDLL"),"RtlRandom")
__cf15&=call(__cf1&,64,4)
long __cf15&,0=&getTickCount
__cf16&=0 : CASE __cfMode& : __cf16&=__cf3("__xeIMP")
__cf17&=0
__cf18&=0
__cf19&=0
__cf20&=0
__cf21&=%hInstance
__cf22&=__cf1(__cf2("USER32"),"GetDesktopWindow")
__cf23&=__cf1(__cf2("USER32"),"GetWindowRect")
__cf24&=__cf1(__cf2("USER32"),"GetClientRect")
__cf25&=__cf1(__cf2("USER32"),"ClientToScreen")
__cf26&=__cf1(__cf2("USER32"),"GetCursorPos")
__cf27&=__cf1(__cf2("USER32"),"GetAsyncKeyState")
__cfS_28&=__cfStaticS("d. MMMM yyyy")
__cfS_29&=__cfStaticS("dddd, 'd'e'r' d'.' MMMM yyyy")
__cfS_30&=__cfStaticS("yyyyMMdd")
__cfS_31&=__cfStaticS("SunMonTueWedThuFriSat")
__cfS_32&=__cfStaticS("JanFebMarAprMayJunJulAugSepOctNovDec")
__cfS_33&=__cfStaticS("HH':'mm':'ss ")
__cfS_34&=__cfStaticS(", ")
__cfS_35&=__cfStaticS(" ")
__cfS_36&=__cfStaticS("+")
__cfS_37&=__cfStaticS("0")
__cfS_38&=__cfStaticS("00")
__cfS_39&=__cfStaticS("HH':'mm")
__cfS_40&=__cfStaticS("ss")
__cfS_41&=__cfStaticS(".")
__cf42&=__cf1(__cf2("USER32"),"SendMessageA")
__cfS_43&=__cfStaticS("LISTBOX")
__cfS_44&=__cfStaticS("DIALOG")
__cf45&=__cf1(__cf2("gdi32.dll"),"SetMapMode")
__cf46&=__cf1(__cf2("gdi32.dll"),"GetDeviceCaps")
proc __cfEOP
parameters exitcode&
FREEDLL __cfdll1&
case %pcount=1 : end exitcode&
end
endproc
proc __cfStaticS
parameters s$
var a&=__cfArgS(s$)
long a&,-8=-1
return a&
endproc
proc __cfArgS
parameters s$
s$=s$+" "
var a&=addr(s$)
var l&=long(a&,-4)-1
var h&=call(__cf1&,64,l&+13)
case l& : call(__cf6&,h&+8,a&,l&)
long h&,0=1
long h&,4=l&
return h&+8
endproc
proc PRINTRTFS
PARAMETERS WND1&,WND2&,WND3&
call(__cf45&,&pdc,1)
VAR IWIDTHTWIPS&=INT((call(__cf46&,&pdc,8)/call(__cf46&,&pdc,88)))*1440
VAR IHEIGHTTWIPS&=INT((call(__cf46&,&pdc,10)/call(__cf46&,&pdc,90)))*1440
DECLARE FR#
DIM FR#,48
LONG FR#,0=&PDC,&PDC,call(__cf46&,&pdc,112),call(__cf46&,&pdc,113),IWIDTHTWIPS&,IHEIGHTTWIPS&
DECLARE FR2#
DIM FR2#,48
LONG FR2#,0=&PDC,&PDC,call(__cf46&,&pdc,112)+IWIDTHTWIPS&*(d1x!/720),call(__cf46&,&pdc,113),IWIDTHTWIPS&*0.5,IHEIGHTTWIPS&*0.1
DECLARE FR3#
DIM FR3#,48
LONG FR3#,0=&PDC,&PDC,call(__cf46&,&pdc,112)+IWIDTHTWIPS&*(d2x!/720),call(__cf46&,&pdc,113),IWIDTHTWIPS&,IHEIGHTTWIPS&*0.1
SENDMESSAGE(WND1&,$00B1,0,-1)
SENDMESSAGE(WND1&,$0400 + 52,0,ADDR(FR#)+40)
VAR CPMIN&=0
VAR PG&=0
WHILE 1
INC PG&
IF PG&=2
LONG FR#,12=call(__cf46&,&pdc,113)
ENDIF
CPMIN&=SENDMESSAGE(WND1&,$0400 + 57,1,ADDR(FR#))
IF PG&=1
SENDMESSAGE(WND2&,$00B1,0,-1)
SENDMESSAGE(WND2&,$0400 + 52,0,ADDR(FR2#)+40)
SENDMESSAGE(WND3&,$00B1,0,-1)
SENDMESSAGE(WND3&,$0400 + 52,0,ADDR(FR3#)+40)
SENDMESSAGE(WND2&,$0400 + 57,1,ADDR(FR2#))
SENDMESSAGE(WND3&,$0400 + 57,1,ADDR(FR3#))
ENDIF
IF CPMIN&>=LONG(FR#,44)
BREAK
ENDIF
LONG FR#,40=CPMIN&
NEXTPAGE
call(__cf45&,&pdc,1)
ENDWHILE
SENDMESSAGE(WND1&,$0400 + 57,0,0)
SENDMESSAGE(WND2&,$0400 + 57,0,0)
SENDMESSAGE(WND3&,$0400 + 57,0,0)
endproc
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
declare a#
dim a#,8'--POINT-Struktur
def Redraw(1) ~RedrawWindow(&(1),0,0,~RDW_FRAME | ~RDW_INVALIDATE | ~RDW_ALLCHILDREN | ~RDW_ERASE)
def SetWndPos(3) ~SetWindowPos(&(1),0,%(2),%(3),0,0,~SWP_NOSIZE | ~SWP_NOZORDER)
window 50,50-900,700
settruecolor 1
usefont "ms sans serif",15,7,0,0,0
setdialogfont 1
usermessages 16
var font&=CreateFont("Verdana",14,0,0,0,0)
declare rtf&,dll&
dll&=usedll("riched20.dll")
rtf&=control("RichEdit20A",mkstr$("noch ne Zeile\n",50),$54301044,80,10,780,560,%hwnd,1234,0,$200)
sendmessage(rtf&,~EM_HIDESELECTION,0,1)
var d1x!=120
declare Dummy1&,Dummy2&
Dummy1&=control("RichEdit20A",mkstr$("Titel\n",2),$54301044,d1x!,0,450,100,rtf&,1234,0,$200)
sendmessage(dummy1&,~EM_HIDESELECTION,0,1)
var d2x!=600
Dummy2&=control("RichEdit20A",mkstr$("Adresse\n",4),$54301044,d2x!,0,150,100,rtf&,1234,0,$200)
sendmessage(dummy2&,~EM_HIDESELECTION,0,1)
var Print&=CreateButton(%hWnd,"Drucken",700,600,80,20)
SetFont print&,font&
' NUR mit der RTF.PCU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var rtf_hdc& = R_PREPAREFORLINEBREAK(rtf&)' Device Context erzeugen mit PCU
R_Init_object(rtf&)'Zum Bildempfang vorbereiten
MCls 100,100 ,RGB(0,0,255)
StartPaint -1
UseFont "Arial",16,0,0,0,0
DrawText 20,50,"mein Logo"
Endpaint
var bmp1&=Create("hPic",0,"&MEMBMP" )
SavePic "Test.jpg", bmp1&, 100
R_GotoStart(rtf&)
R_RTFLOADPICTURE(rtf&, "Test.jpg")
SendString(rtf&,"^{ENTER}")
SendString(rtf&,"^{ENTER}")
SendString(rtf&,"^{ENTER}")
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
while 1
sendmessage( rtf&,(~WM_USER+221),0,a# )
SetWndPos( Dummy1&,d1x!,0-long(a#,4) )
SetWndPos( Dummy2&,d2x!,0-long(a#,4) )
Redraw(rtf&)
locate 0,0
waitinput
case %umessage=16:break
case GetFocus(dummy2&):print "3.rtf"
case GetFocus(dummy1&):print "2.rtf"
case GetFocus(rtf&): print "1.rtf"
If GetFocus(Print&)
STARTPRINT "*xx"
PRINTRTFS(RTF&,Dummy1&,Dummy2&)
ENDPRINT
EndIf
endwhile
' NUR mit der RTF.PCU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R_DEINITRTF(rtf&,RTF_HDC&,PCU_DLL&)
R_DEINIT_OBJECT()
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DeleteObject font&
destroywindow(rtf&)
destroywindow(dummy1&)
destroywindow(dummy2&)
destroywindow(%hwnd)
case dll&:freedll dll&
be me too not yet sure, whether the factor (d1x! / 720) for good is. Perhaps can iF moreover something say. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/16/10 ▲ |
| |
| | | 720 have I imho not written - have with 0.5 calculated circa anyway The middle To to determine. ^^
[offtopic]The ENH sooner virtual as PRC-Files or OBJ-Files for optimale Maschinenlesbarkeit instead of so To wörkeln - is Yes otherwise one bisl How with Notepad ne Exe Edit. ^^[/offtopic] |
| | | | |
| | Uwe ''Pascal'' Niemeier | Hi Thomas!
Äh... have you got you my demonstration time angeschaut? and too The enclosed RTF time with Word or Wordpad opened? there comes yes a integrally other take action to that employment. or shows your example only, How the whole in the principle looks should?
and How steht's with the Print out over my demonstration? As I said, I could not too thoroughly testing.
what with the the Edit of eingebettetem RTF concerns: If the works, wird's well so walk, that the eingebettete Text somehow extract and is then z.B in a own Dialog-Window machine go can. particular Formatierungsfunktionen must You with want then naturally self install.
so integrally simply is the though nicht; can means something last.
SeeYou Pascal |
| | | | |
| | Thomas Freier | hey Pascal,
and How steht's with the Print out over my demonstration? As I said, I could not too thoroughly testing.
first Test without Completed: the Dokumentenende How with iF. heard but in the principle To : RTF and Print out
Äh... have you got you my demonstration time angeschaut? and too The enclosed RTF time with Word or Wordpad opened? there comes yes a integrally other take action to that employment. or shows your example only, How the whole in the principle looks should?
Yes, my example is only principle. whether one Text-Objekt without Word or. OpenOffice practicable is, want You tesen? the itself one external editor or on the place one Edit-area to Double click opens is sure alike. Entscheident is the Einbetten into master-RTF, so it at least in Word, WordPad and XProfan-RTF too displayed and is with erneutem Abspeichern over Word or WordPad not lost goes. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/16/10 ▲ |
| |
| | Uwe ''Pascal'' Niemeier | Hi Thomas!
I mach's short:
1. the Zieldokument with WordPad (!) open 2. "Einfügen/Objekt" dial 3. option New erstellen" dial or. chosen let 4. from the list möglicher Types "WordPad-Dokument" dial 5. it appear in the WordPad-Window one area, into one Text prompt or by Clipboard insert can
the Result is a document with a "echten" RTF-Objekt. otherwise (if MS Word on the computer installs is and one "Einfügen from Datei" dial) kriegt one in reality one Word (DOC) -Objekt. therefore coming I with my try on whom RTF-View source a such Objekt not dran. because none there was...
to usage in a Profan-Edit with OLE-Support:
with Double-click on one solches Objekt becomes WordPad (instead of Word) to that Edit opened.
Print out the finished Dokumentes by FormatRange-Message shining To klappen.
at that attempt, one Objekt in WordPad To move, becomes it to normal Text. is with Profan not the case.
the WordPad-Window with Double click is so big How the Objekt in the Edit and inverse.
Changes at Edit in the WordPad-Windows immediate in the Edit displayed. exception: Änderung the Fenstergröße. The becomes first auf's Objekt applied, if the Content changed becomes.
with Änderung the Size the Objektes in the Edit becomes the Content zermatscht. remedy: to that Edit doppelklicken and WordPad same again close. (or Undo perform)
Please time try. so could itself your trouble Done having
PS: How one one real RTF-Objekt under Profan created, white I not yet. becomes but too somehow weg...
SeeYou Pascal |
| | | | |
| | Thomas Freier | hey Pascal, find I already cool, that You you in this direction attempts have. my Results are very so How You describe. eachone suitable editor (Word, OpenOffice) prepares his own Textobject, the tappt im dunkeln not even mutual optimal Show or quite edit can.
But if You yet Time spare have, How is it with a example over to that create of/ one scheduler How with https://www.sybrex.com/products/gui/ezeepdf/ ? there would but a scheduler with and without Raster wealthy. The becomes of all RTF-Editoren same well displayed. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/23/10 ▲ |
| |
| | Uwe ''Pascal'' Niemeier | Hi Thomas!
tables go of RTF-Control Yes only indirect supported. Wüßte on The speedy not, How one The produce could. But if You already 'ne suitable File have, wozu then new lay out? Nimm The still as Presentation for new documents. Möglicherweise can itself yet what find, around the tables at Edit to unbeabsichtigtem Delete To protect.
PS: If you yet höhere Ansprüche on The Opportunities your Dokumentes position, should You still time HTML in consideration wander
SeeYou Pascal |
| | | | |
|
AnswerTopic-Options | 10.253 Views |
Themeninformationenthis Topic has 3 subscriber: |