English
Source / code snippets

dye gray Icons

 

'Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) into Babyklappe on XProfan.com stored:
'Icons gray dye
'an method, circa Icons gray To dye.
'(C) 2004 Frank Abbing.
Declare bild&,Text$,neu&,array&,x&,y&,z&,but&,pseudobitmap&,bitmap&,wert&,x%,y%,z%
Def SelectObject(2) !GDI32,SelectObject
Def CreateCompatibleBitmap(3) !GDI32,CreateCompatibleBitmap
Def GetSysColor(1) !USER32,GetSysColor
SetTrueColor 1
Window 0,0-800,600
Cls GetSysColor(15)
' Originales Icon with Profanmitteln in that Window loading.
text$=ice-cream.ico
DrawLibIcon Text$,0,40,40
' Originales Icon with Profanmitteln in the Hintergrundsspeicher loading.
x&=32
y&=32
MCLS x&,y&
Startpaint -1
Cls GetSysColor(15)
DrawLibIcon Text$,0,0,0
Icon gray dye
y%=0

Whileloop 32

    x%=0

    Whileloop 32

        z&=GetPixel(x%,y%)

        If z&<>GetSysColor(15)

            z%=(GetRValue(z&)+GetGValue(z&)+GetBValue(z&))/3
            SetPixel x%,y%,Rgb(z%,z%,z%)

        EndIf

        Inc x%

    EndWhile

    Inc y%

EndWhile

' Pseudobitmap create. BM_SETIMAGE functions only with Bitmaps, The keinem HDC zugeordnet are.
pseudobitmap&=CreateCompatibleBitmap(%hdc,x&,y&)
'   Pseudobitmap unserem HDC zuordnen
'   as Result get we our losgelöste Bitmap back !
bitmap&=SelectObject(%hdc,pseudobitmap&)
EndPaint
' Button create via Control / The Create(Button,...) method not working without further
' Button not yet visible !
but&=@Control(Button,,$40000080,40,100,48,48,%hwnd,1001,%Hinstance)
' Bitmap the Button zuordnen
Sendmessage(but&,$F7,0,bitmap&)  BM_SETIMAGE
' Button visible make
ShowWindow(but&,1)
WaitKey
' - Button destroy, so The Bitmap again spare becomes
' - Bitmap delete
DestroyWindow(but&)
DeleteObject bitmap&
End
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.712 Views

Untitledvor 0 min.
H.Brill04/20/21
Jörg Sellmeyer05/28/20
Ernst07/23/16

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