English
Regulars table & Café

ChooseColor.

 


Description:

ChooseColor shows a Farbauswahldialog on and supply The selected colour back.




Deklaration:

Def ChooseColor(1) !COMDLG32,ChooseColorA




Parameter:

1.Parameter: Structure or 32 byte Memory-Variable =>
byte 0-3 = length the Bereiches in Bytes as LongInt.
byte 4-7 = the lever the Fensters, on the the dialog created go should.
byte 8-11 = If as Flag $40 staid watts, standing here the lever the Speicherobjektes, the The new Dialogmaske contains. If as Flag $20 staid watts, standing here the lever the Moduls with the Dialogmaske with the Dialogtitel, the with byte 28 set becomes.
byte 12-15 = as Input one Farbwert, the standardmäßig select becomes. Kehrt The function back, standing here the Farbwert the chosen colour.
byte 16-19 = Zeiger on a 64 byte large Memory-Variable, The as LongIntwerte The Farbwerte the Farbauswahlboxen contains.
byte 20-23 = ? Happen? to Initialisierung the Dialoges =>
$100 = users can any colours dial
$10 = Messages on whom dialog can with the procedure on byte 28 abgefangen go.
$20 = new Dialogbox mask becomes using and is in Module on byte 8. The name standing on byte 28.
$40 = using mask for Dialogue with the lever in byte 8.
$2 = Vollauswahl all colours Show.
$4 = Deaktiviert whom Button to that Open the Dialogbox-expansion.
$1 = default of/ one standard-colour.
$8 = Help-Button Show.
$80 = only Grundfarben selectable.



Return Value:

If User OK clicked has, mismatched 0. otherwise 0.


Examples:

CompileMarkSeparation
Def ChooseColor(1) !"COMDLG32","ChooseColorA"
Declare ChooseColor#,CustomColors#,Colors&[16],Button&,OK&

Proc ColorDialog

    Parameters color&,options&,inifile$,Result&,Name$
    Declare i%
    Dim ChooseColor#,36
    Dim CustomColors#,64
    SetTrueColor 1

    While lt(i%,16)

        Long CustomColors#,mul(i%,4)= Colors&[i%]
        Inc i%

    Wend

    Long ChooseColor#,0=36
    Long ChooseColor#,4=GetActiveWindow()
    Long ChooseColor#,8=0
    Long ChooseColor#,12=RGB(192,192,192)
    Long ChooseColor#,16=CustomColors#
    Long ChooseColor#,20=3 CC_RGBINIT(1) + CC_FULLOPEN(2)
    Long ChooseColor#,24=0
    Long ChooseColor#,28=0
    Let Name$="Fensterfarbe wählen!"
    Long ChooseColor#,32=0
    LET OK&=@ChooseColor(ChooseColor#)

    If OK&<>0

        Let i%=0

        While lt(i%,16)

            Let Colors&[i%]=long(CustomColors#,mul(i%,4))
            Inc i%

        Wend

    EndIf

    Let Result&=@LONG(ChooseColor#,12)
    Dispose ChooseColor#
    Dispose CustomColors#
    Return Result&

EndProc

Windowstyle 31
WindowTitle "Farbe auswählen"
Window 0,0-640,440
Settruecolor 1
Let Button&=@Createbutton(%HWND,"Farbe wählen",20,300,200,30)

While 0=0

    WaitInput

    IF @Getfocus(Button&)

        ColorDialog
        Case OK&<>0 : CLS @&(0)

    endif

=s4 href='./../../function-references/XProfan/wend/'>Wend


[keywords:aa38there9c3b]
colour dialog colours select to determine Farbauswahl Farbauswahldialog
[/keywords:aa38there9c3b]
 
03/07/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.810 Views

Untitledvor 0 min.
RudiB.11/04/21

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


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