English
Forum

Color Windows (or. Dialogen) Change

Vielen Thanks for Your Help!

 

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?

4 kB
Hochgeladen:01/30/13
Downloadcounter0
Download
 
01/30/13  
 



remaining only whom Text too subclassen -

there sounds The Message WM_CTLCOLORSTATIC -

and then SetBkMode( wParam , TRANSPARENT )
 
01/30/13  
 




ByteAttack
look time [...] 
 
01/30/13  
 




Torben
Nissen
Vielen Thanks! this is too super! I must me time longer dll's keep busy... !
 
01/31/13  
 




Julian
Schmidt
How I find The simplest Solution is the FaControl.dll of Frank Abbing. [...] 
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/31/13  
 




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?)
 
02/02/13  
 




Jörg
Sellmeyer
fundamentally functions it so:
CompileMarkSeparation
 $H windows.ph
Cls
Var Ctrl& = Create("Text",%hwnd,"",100,100,200,24)
WaitInput
~SetBkMode(Ctrl&,~TRANSPARENT)
WaitInpu

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.
 
02/02/13  
 




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

4 kB
Hochgeladen:02/02/13
Downloadcounter163
Download
 
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!!!
 
02/02/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.704 Views

Untitledvor 0 min.
Erasmus.Herold11/19/18
Alibre01/06/18
Wilfried05/28/16
Torben Nissen08/04/14
More...

Themeninformationen



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