| |
|
|
 AndreasS | Guten demain, qui Frage: dans einem Programme voudrais je gern PNG's comme Schaltflächen verwenden. Dabei soll beim darüberfahren avec qui souris un d'autre Bild (également avec transparentem Hintergrund) angezeigt volonté et chez Mausklick un weiteres. Über Mausbereiche ne...aucune Problem. mais: cela mets den Einsatz qui Abfrage (@mouse) voraus et ca verhindert den Einsatz de waitinput um sur autre (z.B.) Button trop réagir. Weis irgend quelqu'un une Solution ? qui Einsatz einer Message um cela Waitinput trop durchbrechen, ist weder sinnvoll, encore nutzbringend.
merci
Andreas |
|
|
| |
|
|
|
 Jörg Sellmeyer | ici la hâte Du Schonmal une Anfang: [...] 
qui Einsatz einer Message um cela Waitinput trop durchbrechen, ist weder sinnvoll, encore nutzbringend.
Öhm - wieso pas?  |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 07.12.2011 ▲ |
|
|
|
|
 AndreasS | Zunächst merci. mais c'est wenig hilfreich. Bildbutton sommes ne...aucune Problem et BMP's trop travailler bringt rien, à cause de des fehlenden Alphakanals. cela Durchbrechen eines Waitinput chez Auftreten eines Mausereignisses utilise garnichts, là un Rücksprung sans Probleme pas possible ist. Jedenfalls pas sans cela qui Programmablauf (ici) völlig durcheinander gerät.
Bye Andreas |
|
|
| |
|
|
|
 | peut-être dans cet direction. Neuzeichnen ou bien pour XProfan anpassen.
Déclarer être#,erg&,erg2&,x&,y&
Faible être#,8
DEF GetCursorPos(1) !"User32","GetCursorPos"
DEF WindowFromPoint(2) !"User32","WindowFromPoint"
DEF ChildWindowFromPoint(3) !"User32","ChildWindowFromPoint"
Def GetSysColor(1) !"User32","GetSysColor"
Def ScreenToClient(2) !"User32","ScreenToClient"
cls GetSysColor(15)
DEF &WM_MOUSEMOVE 512
Usermessages &WM_MOUSEMOVE
MCLS 40,40,RGB(0,255,0)
var bmp1%=Créer(«PCSI»,0,"& MEMBMP")
MCLS 40,40,RGB(255,0,0)
var bmp2%=Créer(«PCSI»,0,"& MEMBMP")
var Hdlg&=control("Dialog",»,$58000000,50,50,40,40,%hwnd,5000,0)
Startpaint Hdlg&
DrawPic bmp1%, 0, 0; 0
EndPaint Hdlg&
tandis que 1
waitinput
cas %clé=2:BREAK
Si %Umessage = &WM_MOUSEMOVE
GetCursorPos(être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg&=@WindowFromPoint(x&,y&)
Si erg&<>0
ScreenToClient(erg&,être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
Si erg2&=Hdlg&
Startpaint Hdlg&
DrawPic bmp2%, 0, 0; 0
EndPaint Hdlg&
tandis que 1
waitinput
Si %Umessage = &WM_MOUSEMOVE
GetCursorPos(être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg&=@WindowFromPoint(x&,y&)
Si erg&<>0
ScreenToClient(erg&,être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
cas erg2&<>Hdlg& : BREAK
EndIf
EndIf
Si %MousePressed
Messagebox("Das était un Mausklick im Bild!","I N F O",4160)
SetFocus(Hdlg&)
EndIf
Wend
Startpaint Hdlg&
DrawPic bmp1%, 0, 0; 0
EndPaint Hdlg&
endif
EndIf
endif
Wend
DeleteObject bmp1%
DeleteObject bmp2%
Dispose être#
end
Salut Thomas |
|
|
| |
|
|
|
 Thomas Freier | Alphatrans allez probablement seulement avec GDI+, ou bien es hilft [...] plus. Beispiel avec GDI
$H windows.ph
$H Functions_GDIPLUS.ph
$H GDIP_Imageging.ph
$I GDIP_Helper.inc
Déclarer gdiplusToken&,ImageObject&,ImageObject1&,GraphicObject&,Attributes&
Déclarer Color_Matrix#
SetAutoPaint 1
gdiplusToken& = InitGDIPlus()'GDIPlus starten
Déclarer être#,erg&,erg2&,x&,y&
Faible être#,8
DEF GetCursorPos(1) !"User32","GetCursorPos"
DEF WindowFromPoint(2) !"User32","WindowFromPoint"
DEF ChildWindowFromPoint(3) !"User32","ChildWindowFromPoint"
DEF GetSysColor(1) !"User32","GetSysColor"
DEF ScreenToClient(2) !"User32","ScreenToClient"
DEF &WM_MOUSEMOVE 512
cls GetSysColor(15)
Usermessages &WM_MOUSEMOVE
MCLS 100,100,GetSysColor(15)
var bmp1%=Créer(«PCSI»,0,"& MEMBMP")
var Hdlg&=control("Dialog",»,$58000000,50,50,100,100,%hwnd,5000,0)
OBJECT "A-1.png"'Pfad anpassen
tandis que 1
waitinput
cas %clé=2:BREAK
Si %Umessage = &WM_MOUSEMOVE
GetCursorPos(être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg&=@WindowFromPoint(x&,y&)
Si erg&<>0
ScreenToClient(erg&,être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
Si erg2&=Hdlg&
Créer("Bitmap", Hdlg&, bmp1%, 0, 0)
OBJECT "A-2.png"'Pfad anpassen
tandis que 1
waitinput
Si %Umessage = &WM_MOUSEMOVE
GetCursorPos(être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg&=@WindowFromPoint(x&,y&)
Si erg&<>0
ScreenToClient(erg&,être#)
x&=Long(être#,0)
y&=Long(être#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
cas erg2&<>Hdlg& : BREAK
EndIf
EndIf
Si %MousePressed
Messagebox("Das était un Mausklick im Bild!","I N F O",4160)
SetFocus(Hdlg&)
EndIf
Wend
Créer("Bitmap", Hdlg&, bmp1%, 0, 0)
OBJECT "A-1.png"'Pfad anpassen
endif
EndIf
endif
cas %wmpaint:OBJECT "A-1.png"'Pfad anpassen
Wend
DeleteObject bmp1%
DeleteObject bmp2%
Dispose être#
ExitGDIPlus(gdiplusToken&)'GDIPlus finissons
end
PROC OBJECT
parameters file$
ImageObject1& = gdipLoadImage(file$)'Pfad anpassen
Si ImageObject1&
'et sur %hWnd zeichnen
~GdipCreateFromHWND(Hdlg&,ADDR(GraphicObject&))'alle Graphics-Operationen sur %hWnd
~GdipDrawImageI(GraphicObject&,ImageObject&,20,0)'Bitmap zeichnen
'Bild2 avec zeichnen
~GdipDrawImageRectRect(GraphicObject&,ImageObject1&,0.0,0.0,Single(400.0),Single(400.0),0.0,0.0,Single(400.0),Single(400.0),~UnitPixel,Attributes&,0,0)
~GdipDisposeImageAttributes(Attributes&)
~GdipDisposeImage(ImageObject&)
~GdipDisposeImage(ImageObject1&)
~GdipDeleteGraphics(GraphicObject&)
Dispose Color_Matrix#
Endif
ENDPROC
Salut Thomas |
 |
|
| |
|
|