| |
|
|
 Torben Nissen | 
at that SubClassing is only the trouble, that the Text then again a beigen background (Windows XP) has - see graphic.  gives it there a Possibility the "Textproblem" hinzubekommen?
The XFrame.dll sees very very promising from. The I will me time accurate standing... 
Vielen Thanks for Your Tipps! Perhaps has someone Yes another idea, How the background of Text at SubClassing unchanged remaining? |
|
|
| |
|
|
|
 | remaining only whom Text too subclassen -
there sounds The Message WM_CTLCOLORSTATIC -
and then SetBkMode( wParam , TRANSPARENT ) |
|
|
| |
|
|
|
 ByteAttack | |
|
| |
|
|
|
 Torben Nissen | Vielen Thanks! this is too super! I must me time longer dll's keep busy... !  |
|
|
| |
|
|
|
 Julian Schmidt | How I find The simplest Solution is the FaControl.dll of Frank Abbing. [...]  |
|
|
| |
|
|
|
 Torben Nissen | Hi, today have I (finally) again Time, in order to program. thereby engage I still with the formation from the Windows. withal the tollen dll's would like I it self with SubClassing try. Anhand the Beispiels of Andreas Miethe and the Helpfile, I get it there, The Backgroundcolor now To Change.  iF was so nice and has me whom Info given, that one whom Text too subclassen must, if the beige background not durchscheinen should. I have however not yet The thing with "SetBkMode( wParam , TRANSPARENT )" understood. in the Help find I To "wParam":
&sWParam: The WParam-worth the Message. How setting I "SetBKMode" and "wParam, Transparent" circa? (SendMessage?) |
|
|
| |
|
|
|
 Jörg Sellmeyer | fundamentally functions it so: CompileMarkSeparation What exactly You there now at Subclassing make must white I but in the momentum neither. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 02/02/13 ▲ |
|
|
|
|
 | Imho simply WM_CTLCOLORSTATIC Message in wProc and then whom bkmode on hdc == wparam. |
|
|
| |
|
|
|
 Andreas Miethe
 | here time one small example.

i hope so is enough comments. CompileMarkSeparation'######################
'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/13 ▲ |
|
|
|
|
 Torben Nissen | Vielen Thanks, Andreas! so I will now first works can!
... I have it geschafft! the Example of Andreas is super! thanks!!!  |
|
|
| |
|
|