| |
|
|
| Farbauswahl-Dialog (Colorchoosebox) von Stefan Schnell
KompilierenMarkierenSeparieren-Begin----------------------------------------------------------- ------
-ExternalFunctions---------------------------------------------------
Def @ChooseColor(1) !"COMDLG32.DLL", "ChooseColorA"
-StructuresDefinition------------------------------------------------
Declare CHOOSECOLOR#
Struct TCHOOSECOLOR = lStructSize&, hwndOwner&, hInstance&,
rgbResult&, lpCustColors&, Flags&, lCustData&, lpfnHook&,
lpTemplateName&
Dim CHOOSECOLOR#, TCHOOSECOLOR
-ConstantsDefinition-------------------------------------------------
Def &CC_ANYCOLOR $100
Def &CC_ENABLEHOOK $10
Def &CC_ENABLETEMPLATE $20
Def &CC_ENABLETEMPLATEHANDLE $40
Def &CC_FULLOPEN $2
Def &CC_PREVENTFULLOPEN $4
Def &CC_RGBINIT $1
Def &CC_SHOWHELP $8
Def &CC_SOLIDCOLOR $80
-VariablesDefinition-------------------------------------------------
Declare UDC&[15]
Declare Res$
-Main----------------------------------------------------------------
-Define UserColors-------------------------------------------------
UDC&[0] = @RGB(255, 127, 255)
UDC&[1] = @RGB(255, 127, 127)
UDC&[2] = @RGB(127, 127, 127)
-------------------------------------------------------------------
With CHOOSECOLOR#
.lStructSize& = @SizeOf(CHOOSECOLOR#)
.hwndOwner& = 0
.hInstance& = 0
.rgbResult& = @RGB(0, 255, 0)
.lpCustColors& = @Addr(UDC&[0])
.Flags& = &CC_FULLOPEN | &CC_ANYCOLOR | &CC_RGBINIT
EndWith
If @ChooseColor(CHOOSECOLOR#)
Res$ = @Str$(CHOOSECOLOR#.rgbResult&) + "
"
Res$ = Res$ + "Rotanteil: " +
@Str$(@GetRValue(CHOOSECOLOR#.rgbResult&)) + "
"
Res$ = Res$ + "Grünanteil: " +
@Str$(@GetGValue(CHOOSECOLOR#.rgbResult&)) + "
"
Res$ = Res$ + "Blauanteil: " +
@Str$(@GetBValue(CHOOSECOLOR#.rgbResult&))
@MessageBox(Res$, "Gewählte Farbe", 64)
EndIf
Dispose CHOOSECOLOR#
-End-------------------------------------------------------------------
f='./../../funktionsreferenzen/xprofan/end/'>End
|
|
|
| |
|
|
|
Ralph Theobald | Ciao,
habe beim Spielen mit dem Monthcalc - Control , den Colorchoose - Dialog gehookt .
Ich wollte auch die Beschriftung der Buttons im Farbdialog ändern, leider Fehlanzeige.
Saluto Ralph |
|
|
| |
|
|