English
Source / code snippets

Control determine Textfarbehintergrundfarbe

 

Jac
de
Lad
gives it a Possibility, The Textfarbe or. Backgroundcolor a Controls (STATIC) through Profan- or windows-Bordmitteln To festzulegen?

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/18/07  
 




Rolf
Koch
Hi,

with Subclass see on Andreas Miehtes Page or How had with the genialen SKCONTROL.DLL (go but of it from, that You these hold not benefit want lt. Your Postings).

or mach it so, because create(Bitmap .... is indeed one Static
CLS

Proc COLORSTATIC

    declare colst&,c.dm&
    parameters c.hwnd&,c.txt$,c.x&,c.y&,c.b&,c.h&,c.hwcol&,c.txtcol&
    mcls c.b&,c.h&
    STARTPAINT -1
    cls c.hwcol&
    usefont ms sans serif,13,0,0,0,0
    textcolor c.txtcol&,-1
    DrawText 2,2,c.txt$
    savebmp DUM.BMP,0,0-c.b&,c.h&
    ENDPAINT
    c.dm& = CREATE(HPIC,-1,DUM.BMP)
    colst&=Create(BITMAP,%HWND,c.dm&,c.x&,c.y&)
    Assign #1,DUM.BMP
    Erase #1
    return colst&

ENDPROC

declare static1&,static2&
COLORSTATIC %HWND,this is one Test,10,10,120,20,RGB(255,0,0),RGB(255,255,255)
STATIC1&=&(0)
COLORSTATIC %HWND,Well yet of/ one,10,35,120,20,RGB(0,0,255),RGB(0,255,255)
STATIC2&=&(0)
WAITINPUT

only roughly as Presentation.
could Yes yet More so make: Font indicate, position the Textes u.s.w.

Edit:
here something I mean:
CLS

Proc COLORSTATIC

    declare colst&,c.dm&
    parameters c.hwnd&,c.txt$,c.x&,c.y&,c.b&,c.h&,c.hwcol&,c.txtcol&,FT$,gr&,bold&
    mcls c.b&,c.h&
    STARTPAINT -1
    cls c.hwcol&
    usefont FT$,gr&,0,bold&,0,0
    textcolor c.txtcol&,-1
    DrawText 2,2,c.txt$
    savebmp DUM.BMP,0,0-c.b&,c.h&
    ENDPAINT
    c.dm& = CREATE(HPIC,-1,DUM.BMP)
    colst&=Create(BITMAP,%HWND,c.dm&,c.x&,c.y&)
    Assign #1,DUM.BMP
    Erase #1
    return colst&

ENDPROC

declare static1&,static2&
COLORSTATIC %HWND,this is one Test,10,10,120,20,RGB(255,0,0),RGB(255,255,255),MS SANS SERIF,13,0
STATIC1&=&(0)
COLORSTATIC %HWND,Well yet of/ one,10,35,120,20,RGB(0,0,255),RGB(0,255,255),ARIAL,18,1
STATIC2&=&(0)
WAITINPUT
 
02/18/07  
 




Jac
de
Lad
Hm...

i will, that the background the Überschriften in InstallChild white is. therefore make itself there Bitmaps badly. I look time moreover, thanks for response!
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/18/07  
 



Why not drawtext ?
 
02/18/07  
 




Rolf
Koch
Sorry kapier I do not, because straight Bitmaps or Graphics rounds one Program ex.
and obiges would in Your drop very the Right thing.
DEF GETSYSCOLOR(1) !USER32,GetSysColor
CLS GETSYSCOLOR(15)

Proc COLORSTATIC

    declare colst&,c.dm&
    parameters c.hwnd&,c.txt$,c.x&,c.y&,c.b&,c.h&,c.hwcol&,c.txtcol&,FT$,gr&,bold&
    mcls c.b&,c.h&
    STARTPAINT -1
    cls c.hwcol&
    usefont FT$,gr&,0,bold&,0,0
    textcolor c.txtcol&,-1
    DrawText 2,2,c.txt$
    savebmp DUM.BMP,0,0-c.b&,c.h&
    ENDPAINT
    c.dm& = CREATE(HPIC,-1,DUM.BMP)
    colst&=Create(BITMAP,%HWND,c.dm&,c.x&,c.y&)
    Assign #1,DUM.BMP
    Erase #1
    return colst&

ENDPROC

declare static1&,static2&
COLORSTATIC %HWND,Welcome to that hypergeilen Setup,0,0,width(%hwnd),35,RGB(255,255,255),RGB(0,0,255),MS SANS SERIF,30,1
STATIC1&=&(0)
WAITINPUT
 
02/18/07  
 




Jac
de
Lad
Well, I should for each step one new Bitmap make, moreover had I then Problems with the Line break. OK, I überdenke the again!
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/19/07  
 




Rolf
Koch
it'll still only a Dummybitmap prepares and You call it Yes like a Createtext on. You benötigst too none Umbruch, separate setting The Statics so, as if You several Texts setting:

Text1 ------------- Text1 = 30 px over kmpl. length
Text2 ------------- Text2 = 15 px over kmpl. length
 
02/19/07  
 




Jac
de
Lad
Hm, ok, I probiers! thanks!
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/19/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

9.133 Views

Untitledvor 0 min.
Sven Bader11/22/23
Axel Berse11/03/23
rafl08/09/18
ByteAttack12/12/16
More...

Themeninformationen

this Topic has 3 subscriber:

Jac de Lad (4x)
Rolf Koch (3x)
iF (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