Source / code snippets | | | | 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
|
| | | | |
| | 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 ▲ |
| |
| | | | | | | |
| | 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
|
| | | | |
| | 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 |
| | | | |
| | 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 QuelltextThemeninformationenthis Topic has 3 subscriber: |