| |
|
|
 Torben Nissen | 
Beim SubClassing es sólo el problema, dass el Texto entonces otra vez una beigen Hintergrund (Windows XP) ha - siehe Grafik.  Gibt lo como una Möglichkeit el "Textproblem" hinzubekommen?
El XFrame.dll sieht muy vielversprechend de. El voluntad Yo veces genauer ansehen... 
Vielen Dank para Eure Tipps! Tal vez ha alguien sí ni Concepto, como el Hintergrund vom Texto beim SubClassing unverändert restos? |
|
|
| |
|
|
|
 | Bleibt sólo el Texto auch subclassen -
como lautet el Message WM_CTLCOLORSTATIC -
y luego SetBkMode( wParam , TRANSPARENT ) |
|
|
| |
|
|
|
 ByteAttack | |
|
| |
|
|
|
 Torben Nissen | Vielen Dank! Es auch super! Yo muss mich veces mehr con dll's beschäftigen... !  |
|
|
| |
|
|
|
 Julian Schmidt | Como Yo finde el einfachste Solución Es el FaControl.dll de Frank Abbing. [...]  |
|
|
| |
|
|
|
 Torben Nissen | ¡Hola, heute Yo (endlich) otra vez Tiempo, en a programa. Dabei beschäftige Yo mich siempre todavía con el Gestaltung de los Fenstern. Trotz el tollen dll's möchte Yo incluso con SubClassing probieren. Anhand des Beispiels de Andreas Miethe y Hilfedatei, bekomme Yo hin, el Color de fondo nun a ändern.  IF war así nett y ha me el Referencia gegeben, dass uno el Texto auch subclassen muss, si la beige Hintergrund no durchscheinen se. Yo habe sin embargo todavía no el Sache con "SetBkMode( wParam , TRANSPARENT )" verstanden. In el Ayuda finde Yo a "wParam":
&sWParam: Der WParam-Valor el Message. Como setzte Yo "SetBKMode" y "wParam, Transparent" en? (SendMessage?) |
|
|
| |
|
|
|
 Jörg Sellmeyer | Grundsätzlich funktioniert lo así: KompilierenMarcaSeparación Was genau du como ahora beim Subclassing hacer musst weiß Yo aber en el Moment auch no. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 02.02.2013 ▲ |
|
|
|
|
 | Imho simplemente WM_CTLCOLORSTATIC Nachricht en wProc y luego el bkmode en hdc == wparam. |
|
|
| |
|
|
|
 Andreas Miethe
 | Hier veces una kleines Ejemplo.

Yo hoffe es ausreichend kommentiert. KompilierenMarcaSeparación'######################
'Header-Dateien
'######################
$H Windows.ph
$H Messages.ph
'######################
Set("FastMode",1)'FastMode einschalten
Windowstyle 543
WindowTitle "Test"
window 480,140
cls $993333
UseIcon "A"
Declare Ende&,TextControl&,EditControl&
Declare BackGroundBrush&
SetStyle %hWnd,1,(GetStyle(%hWnd,1) | ~WS_CLIPCHILDREN)'verhindert das Flackern der Conrrols
SubClass %HWnd,1
TextControl& = Create("TEXT",%hwnd,"Farbiger Text",10,10,120,24)
EditControl& = Create("EDIT",%hwnd,"Edit mit Farbverlauf",10,40,400,24)
'einen Farbverlauf für den Hintergrund des Edit-Controls
BackGroundBrush& = CreateGradientBrush(EditControl&)
Whilenot Ende&
Waitinput
Endwhile
~DeleteObject(BackGroundBrush&)
End
SubClassProc
If SubClassMessage(&sWnd,~WM_CLOSE)
Ende& = 1
Set("WinProc", 1)
ElseIf SubClassMessage(&sWnd,~WM_CTLCOLOREDIT)'Edit-Controls
Set("WinProc", 0)
'SetBkMode setzt den Hintegrund-Modus des gewählten Device-Contextes (HDC)
~SetBkMode(&swparam,~Transparent)
'SetTextColor setzt die Textfarbe des Device-Contextes (HDC)
~SetTextColor(&swparam,$00FFFF)
Return BackGroundbrush&'Rückgabe ist der Brush
ElseIf SubClassMessage(&sWnd,~WM_CTLCOLORSTATIC)'Static-Controls
Set("WinProc", 0)
'SetBkMode setzt den Hintegrund-Modus des gewählten Device-Contextes (HDC)
~SetBkMode(&swparam,~Transparent)'&swparam ist der Device-Context des Controls
'SetTextColor setzt die Textfarbe des Device-Contextes (HDC)
~SetTextColor(&swparam,$0099FF)
Return ~GetStockObject(~NULL_BRUSH)'Rückgabe ist der Brush
EndIf
EndProc
Proc GradientRect
Parameters DC&,x%,y%,w%,h%,Color1&,Color2&,HV&
Declare GradRect#,Trivertex#
Dim GradRect#,8
Dim Trivertex#,32
Long Gradrect#,0 = 0,1
Long Trivertex#,0=x%,y%
word Trivertex#,8=GETRVALUE(Color1&) << 8,GETGVALUE(Color1&) << 8,GETBVALUE(Color1&) << 8,0
Long Trivertex#,16=w%,h%
word Trivertex#,24=GETRVALUE(Color2&) << 8,GETGVALUE(Color2&) << 8,GETBVALUE(Color2&) << 8,0
External("Msimg32.dll","GradientFill",DC&,Trivertex#,2,Gradrect#,HV&,0)
Dispose Trivertex#
Dispose Gradrect#
EndProc
Proc CreateGradientBrush
Parameters tControl&
Var Result& = 0
Var BMP& = Create("hNewPic", Width(tControl&),1,0)
StartPaint BMP&
GradientRect(%hdc,0,0,Width(tControl&),1,$404000,$CAFFCA,1)
EndPaint
Result& = ~CreatePatternBrush(BMP&)
~DeleteObject(BMP&)
Return< sult&
ENDPROC
|
 |
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 02.02.2013 ▲ |
|
|
|
|
 Torben Nissen | Vielen Dank, Andreas! Damit voluntad Yo ahora primero trabajo puede!
... Yo habe lo geschafft! Das Ejemplo de Andreas es super! Gracias!!!  |
|
|
| |
|
|