English
Source / code snippets

Rtf type Change

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
RTF: Schriftart ändern
WindowTitle Bitte Text mit der Maus markieren ...
window 50,50-500,400
settruecolor 1
usermessages 16---WM_CLOSE > Schliessen abfangen
usefont ms sans serif,15,7,0,0,0
setdialogfont 1
declare rtf#,Edit&,dll&,Test1%,Test2%,Test3%
dim rtf#,60
dll&=usedll(riched32.dll)
Edit&=control(RichEdit,,$54315004,180,10,300,200,%hwnd,100,%hinstance,$200)
settext Edit&,Test: LaberLaberLaber
sendmessage(Edit&,1087,0,1)----------EM_HIDESELECTION => none
Test1%=create(button,%hwnd,Arial,10,10,150,22)
Test2%=create(button,%hwnd,Times New Roman,10,40,150,22)
Test3%=create(button,%hwnd,WingDings,10,70,150,22)
def CreateFontIndirect(1) !GDI32,CreateFontIndirectA
def SelectObject(2) !GDI32,SelectObject
def GetTextCharset(1) !GDI32,GetTextCharset

proc rtf-SetFont---------------------------------------------------------------------SetFont

    parameters a$
    declare a&,b&
    --Charset des Fonts ermitteln (ANSI,ASCII,Symbol usw.)
    clear rtf#
    byte rtf#,23=1
    string rtf#,28=a$
    b&=CreateFontIndirect(rtf#)
    SelectObject(%hdc,b&)
    a&=GetTextCharset(%hdc)
    deleteobject b&
    --Font zuordnen
    clear rtf#
    long rtf#,0=60
    long rtf#,4=$28000000--dwMask > CFM_FACE
    byte rtf#,24=a&--------CharSet des Fonts
    string rtf#,26=a$
    sendmessage(Edit&,1092,1,rtf#)-EM_SETCHARFORMAT
    endproc------------------------------------------------------------------------------------

    while 1

        waitinput
        case %umessage=16:break

        if getfocus(Test1%)

            rtf-SetFont Arial

        elseif getfocus(Test2%)

            rtf-SetFont Times New Roman

        elseif getfocus(Test3%)

            rtf-SetFont Wingdings

        endif

    endwhile

    destroywindow(Edit&)
    case dll&:FreeDLL dll&
    ./../function-references/XProfan/dispose/'>dispose rtf#
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.701 Views

Untitledvor 0 min.
Sven Bader11/18/23
Uwe Lang06/20/23
H.Brill02/08/22
RudiB.08/28/21
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


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