English
Regulars table & Café

LoadImage.

 


Description:

The function LoadImage loading a Cursor, one Icon or one Bitmap WinXP? and gives which lever back.




Deklaration:

DEF @LoadImage(6) !USER32,LoadImageA




Parameter:

1.Parameter: here standing the instance-lever the Moduls, from the the image loaded go should. can 0 his, if the image a File loaded and is in Parameter 6 ‚$10’ present is.
2.Parameter:
If $10 definiert wude, standing here The address one Strings, the whom Filenames the Bildes contains.
If $10 not definiert watts and Parameter 1 one instance-lever definiert watts, standing here The address one Strings, the whom names the Bildes in the File contains.
If $10 not definiert watts and Parameter 1 no instance-lever definiert watts, standing into downstairs two byte (Word) the Identifier the OEM Images, the loaded go should.
3.Parameter: here standing one Flag for type the Images, the loaded go should =>
$0 = Bitmap
$1 = Icon
$2 = Cursor
4.Parameter: here standing The desired wide the Bildes in Pixeln as Integer.
5.Parameter: here standing The desired Höhe the Bildes in Pixeln as Integer.
6.Parameter: ? Happen? The to determine, How the image loaded go should. ? Happen? can with | add go =>
-$0 = loading the image coloured.
-128 = Streckt the image not Parameter 4 and 5.
following ? Happen? gibt’s not under WindowsNT =>
-$1 =Lädt the image not coloured.
-$40 = loading the image under Using the system Standartgrößen.
-$10 = invite Image a Bilddatei.
-$1000 = supplant defined Grauwerte through Systemfarben.
-$20 = takes whom Farbwert the first Pixels the Bildes and supplant any Pixel of these Farbwert by the Backgroundcolor the Fensters.



Return Value:

watts The function successful implemented, becomes the lever the begot Objektes zurückgeliefert. with failure 0.


Examples:

CompileMarkSeparation
Def GetSysColor(1) !"USER32","GetSysColor"
DEF @LoadImage(6) !"USER32","LoadImageA"
SETTRUECOLOR 1
DECLARE ENDE%,x1%,y1%,sicher%,bild&
DECLARE HSCROLL1%,HWSTATUS&,HWSTATUS2&,Bild$
DECLARE VSCROLL1%,Hwscrollrech%,Vscrollrech%

PROC BILDLADEN

    Parameters bild$,x%,y%,hw&
    Declare wfb#,bild&,h&
    Dim wfb#,Add(Len(bild$),1)
    String wfb#,0=bild$
    Let h&=LoadImage(0,wfb#,0,x%,y%,$50)
    bild&=Control("STATIC","",$05000010E,0,0,x%,y%,hw&,2001,%hinstance)
    @SendMessage(bild&,$172,0,h&)
    Dispose wfb#
    return bild&

ENDPROC

PROC LADEN

    PARAMETERS BILD$
    MLoadBMP BILD$ Nur um die X und Y Werte zu ermitteln!
    X1%=%BmpX
    y1%=%BmpY
    destroywindow(bild&)
    BILDLADEN BILD$,X1%,Y1%,hwstatus&
    bild&=@&(0)
    hwstatus2&=@&(0)
    SetScrollRange hscroll1%,0,div(x1%,2)
    SetScrollRange Vscroll1%,0,div(y1%,2)
    SetScrollPos hscroll1%,0
    SetScrollPos vscroll1%,0
    Return bild&

ENDPROC

WINDOWSTYLE 63
WINDOWTITLE "TASTE F12 neues Bild laden"
WINDOW 236,190-501,311
CLS GETSYSCOLOR(15)
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT 1
HSCROLL1% = CREATE("HScroll",%HWND,"",0002,0260,0490,0016)
VSCROLL1% = CREATE("VScroll",%HWND,"",0476,0002,0016,0256)
hwstatus&=Control("STATIC","",$54001100,2,2,472,255,%hwnd,2000,%hinstance,512) Wenn kleinere Profanversion, bitte 512 entfernen!!!
Bild$=""
EnableWindow HSCROLL1%,0
EnableWindow VSCROLL1%,0

WHILENOT ENDE%

    WAITINPUT

    If @EQU(%KEY,2)

        LET ENDE%= 1

    ELSEIF EQU(%SCANKEY,123)

        LET BILD$=@LOADFILE$("ÖFFNE:","*.BMP")

        IF neq$(Bild$,"")

            LADEN Bild$
            bild&=@&(0)

        ELSE

            DestroyWindow (Bild&)
            EnableWindow HSCROLL1%,0
            EnableWindow VSCROLL1%,0

        Endif

        ENDIF    IF NEQ$(BILD$,"")
        EnableWindow HSCROLL1%,1
        EnableWindow VSCROLL1%,1

        IF GETFOCUS(HSCROLL1%) HScroll

            hwscrollrech%=getscrollpos(hscroll1%)-getscrollpos(hscroll1%)*2
            setwindowpos hwstatus2&=hwscrollrech%,vscrollrech%-x1%,y1%,0
            REPAINT
            setfocus(%hwnd)

        ELSEIF GETFOCUS(VSCROLL1%) VScroll

            Vscrollrech%=getscrollpos(Vscroll1%)-getscrollpos(Vscroll1%)*2
            setwindowpos hwstatus2&=hwscrollrech%,Vscrollrech%-x1%,y1%,0
            REPAINT
            setfocus(%hwnd)

        ENDIF

    ENDIF

WEND

 
03/08/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.060 Views

Untitledvor 0 min.
Rainer Hoefs05/02/23
Jörg Sellmeyer06/24/18
Uwe Lang09/03/12
Michaeal03/21/12

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