English
Forum

Button-style

 

Thomas
Freier
Can prevent, that the Button at Hover or to the Click XP To W7 his Appearance changed?
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/06/10  
 




Jörg
Sellmeyer
prevent, that it his Appearance not changed? double negation solid?
somehow understand I The question none...
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/06/10  
 




Thomas
Freier
@Jörg, is correct, was too much. means with Hover no Fabumschlag and to Click one Punktrahmen.
The alternative is naturally a Bmp and query where one Click instead of found.

11 kB
Hochgeladen:06/06/10
Downloadcounter159
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/06/10  
 




Rolf
Koch
because of the Punkterahmen: Perhaps (only a banale idea) a unsichtbaren funktionslosen Button create and to Click dummymässig to the Focus uneasily? Siehste, so what there under windows 7 not any more (disgusting Punktrahmen)
 
06/06/10  
 




ByteAttack
Well. either via Picture one's own Button create, or simply SKControl [...]  using.
 
Website:  [...] 
Facebook:  [...] 
06/06/10  
 



Thomas suitor, Beitrag=57377, Zeitpunkt=06.06.2010
Can prevent, that the Button at Hover or to the Click XP To W7 his Appearance changed?


Hello Thomas,

to EnableWindow button&,0 .

or such hässlicher Konstrukt:
CompileMarkSeparation
simply ists imho you don't say so. ^^
CompileMarkSeparation
 $H windows.ph
cls
var myButton&=createMySonderButton(%hWnd,"Hallo Welt",10,10,100,100)

whilenot %key

    waitInput
    case clicked(myButton&) : messageBox "","",0

wend

deleteObject ~getWindowLong(myButton&,~gwl_userData)
end

proc createMySonderButton

    parameters parent&,Text$,x&,y&,xx&,yy&
    var myButton&=create("button",parent&,Text$,x&,y&,xx&,yy&)
    mcls xx&,yy&
    startPaint myButton&
    copyBmpToMem 0,0 - xx&,yy& > 0,0
    EndPaint
    var myHPic&=create("hNewPic",xx&,yy&,0)
    startPaint myHPic&
    mCopyBmp 0,0 - xx&,yy& > 0,0;0
    EndPaint
    ~setWindowLong(myButton&,~gwl_userData,myHPic&)
    subClass myButton&,1
    return myButton&

endproc

subClassProc

    if subClassMessage(myButton&,15)//wm_paint

        set("winProc",0)
        startPaint myButton&
        drawPic ~getWindowLong(myButton&,~gwl_userData),0,0;0
        EndPaint
        ~validateRect(myButton&,0)
        return 1

    endif

endproc


But "Murx" at least z.B. because the control only correctly displayed becomes if it sichbar (not covers) _erzeugt watts.

for so simple Spielereien but vlt. enough - i'd well sooner (as well as already suggested) one Bitmap(-Static) benefit instead of such Konstrukt. ^^

314 kB
Hochgeladen:06/07/10
Downloadcounter100
Download
 
06/07/10  
 




ByteAttack
here time one simple example one Hover-Button under XProfan:
CompileMarkSeparation
USERMESSAGES 16
Declare appexit%,Button&,Hover&
Set("TrueColor",1)
WindowStyle 26
WindowTitle "Hover-Button"
Window ((%maxX/2)-320),((%maxY/2)-240)-640,480
Lade Button
Button&=Create("HPic",-1,$ProgDir+"button_a.bmp")
Lade HoverButton
Hover&=Create("HPic",-1,$ProgDir+"button_b.bmp")
Zeichne Button
DrawPic Button&,10,10;0

WhileNot appexit%

    GetMessage
    Case %Umessage=16:appexit%=1

    if Mouse(10,10-135,50)  Wenn MouseOver Button

        DrawPic Hover&,10,10;0  Zeichne Hover

        While Mouse(10,10-135,50)

            Warten auf Mausereigniss wenn MouseOver Button

        EndWhile

        DrawPic Button&,10,10;0 MouseOut

    endif

EndWhile

DeleteObject Button&
DeleteObject Hover&
end

example in the attachment

673 kB
Hochgeladen:06/07/10
Downloadcounter107
Download
 
Website:  [...] 
Facebook:  [...] 
06/07/10  
 




Paul
Glatz

CompileMarkSeparation
cls
var myButton&=Button(%hWnd,"Hallo Welt",10,10,100,100)

whilenot %key

    waitInput
    case clicked(myButton&) : messageBox "","",0

wend

end

proc Button

    parameters parent&,text$,x&,y&,xx&,yy&
    var myButton&=create("button",parent&,text$,x&,y&,xx&,yy&)
    mcls xx& + 2,yy& + 2
    startPaint myButton&
    copyBmpToMem 0,0 - xx&,yy& > 0,0
    endPaint
    var myHPic&=create("hNewPic",xx&,yy&,0)
    startPaint myHPic&
    mCopyBmp 0,0 - xx&,yy& > 0,0;0
    endPaint
    destroyWINDOW(mybutton&)
    mybutton& = Create("PicButton",parent&,myHPic&,x&,y&,xx& + 1,yy& + 1)
    deleteObject myHPic&
    return myButton&

endproc

 
06/07/10  
 




Thomas
Freier
thanks for Notes. there The SKControl ohnehin in the program in use is, was is the least hoisted a SKCtrl_CreateUserButton einzusetzen.
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/07/10  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.087 Views

Untitledvor 0 min.
Georg01/14/21
H.Brill01/10/19
Walter06/08/18
Peter Max Müller11/02/17
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