|  | 
|   | 
 | 
  |  KompilierenMarkierenSeparierenSource wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Statik: Text- und Hintergrundfarbe festlegen
WindowTitle Text und Hintergrundfarbe für Controls
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,Dies ist ein Test,10,10,120,20,RGB(255,0,0),RGB(255,255,255)
STATIC1&=&(0)
COLORSTATIC %HWND,Naja noch ein Text,10,35,120,80,RGB(0,0,255),RGB(0,255,255)
STATIC2&=&(0)
StartPaint STATIC2&
usefont ms sans serif,13,0,1,0,0
textcolor RGB(255,255,0),-1
DrawText 10,30,mit ein paar
DrawText 10,50,mehr Zeilen.
EndPaint
WAITINPUT
end
 |  
  | 
|   | 
 |  | 
|   | 
 
 
  |