| |
|
|
![AndreasS: 12/07/11](.././../../i/a/noavatar.gif) AndreasS | good tommorrow, The question: In one Program would like I gladly PNG's as Schaltflächen use. thereby should at darüberfahren with the mouse one other Image (ditto with transparentem background) showing and with Click one further. About Mausbereiche no trouble. but: the setting whom employment the request (@mouse) ahead and this prevented whom employment of waitinput circa on others (z.B.) Button To react. wisely anybody a Solution ? The employment of/ one Message around the Waitinput To durchbrechen, is weder meaningfully, yet nutzbringend.
thanks
Andreas |
|
|
| |
|
|
|
![Jörg Sellmeyer: 12/07/11](.././../../i/a/8132362004294faafc5e8c.jpg) Jörg Sellmeyer | here have You Schonmal a beginning: [...] ![](/intl/i/lnk.gif)
The employment of/ one Message around the Waitinput To durchbrechen, is weder meaningfully, yet nutzbringend.
Öhm - wieso not? ![](.././../../i/s/gruebel.gif) |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... ![](https://www.wuestensand.info/images/CoverFataMorganaklein.jpg) | 12/07/11 ▲ |
|
|
|
|
![AndreasS: 12/07/11](.././../../i/a/noavatar.gif) AndreasS | first of all thanks. but this is unhelpful. Bildbutton are no trouble and BMP's To works bring nothing, because of the missing Alphakanals. the Durchbrechen one Waitinput with appear one Mausereignisses uses garnichts, there one Rücksprung without Problems you don't say so is. anyway not without the the Programmablauf (here) at sixes and sevens unit.
Bye Andreas |
|
|
| |
|
|
|
![: 12/07/11](.././../../i/a/noavatar.gif) | Perhaps in these direction. Repaint or to XProfan adjust.
Declare be#,erg&,erg2&,x&,y&
Dim be#,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
User Messages &WM_MOUSEMOVE
MCLS 40,40,RGB(0,255,0)
var bmp1%=Create("HPIC",0,"&MEMBMP")
MCLS 40,40,RGB(255,0,0)
var bmp2%=Create("HPIC",0,"&MEMBMP")
var Hdlg&=control("Dialog","",$58000000,50,50,40,40,%hwnd,5000,0)
Startpaint Hdlg&
DrawPic bmp1%, 0, 0; 0
Endpaint Hdlg&
while 1
waitinput
case %key=2:BREAK
If %Umessage = &WM_MOUSEMOVE
GetCursorPos(be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg&=@WindowFromPoint(x&,y&)
If erg&<>0
ScreenToClient(erg&,be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
If erg2&=Hdlg&
Startpaint Hdlg&
DrawPic bmp2%, 0, 0; 0
Endpaint Hdlg&
while 1
waitinput
If %Umessage = &WM_MOUSEMOVE
GetCursorPos(be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg&=@WindowFromPoint(x&,y&)
If erg&<>0
ScreenToClient(erg&,be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
case erg2&<>Hdlg& : BREAK
EndIf
EndIf
If %MousePressed
Messagebox("Das was one Click in the Image!","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 be#
end
Greeting Thomas |
|
|
| |
|
|
|
![Thomas Freier: 12/07/11](.././../../i/a/722278123487bd8c272307.gif) Thomas Freier | Alphatrans goes presumably only with GDI+, or it helps [...] moreover. example with GDI
$H windows.ph
$H Functions_GDIPLUS.ph
$H GDIP_Imageging.ph
$I GDIP_Helper.inc
Declare gdiplusToken&,ImageObject&,ImageObject1&,GraphicObject&,Attributes&
Declare Color_Matrix#
SetAutoPaint 1
gdiplusToken& = InitGDIPlus()'GDIPlus started
Declare be#,erg&,erg2&,x&,y&
Dim be#,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)
User Messages &WM_MOUSEMOVE
MCLS 100,100,GetSysColor(15)
var bmp1%=Create("HPIC",0,"&MEMBMP")
var Hdlg&=control("Dialog","",$58000000,50,50,100,100,%hwnd,5000,0)
OBJECT "A-1.png"'way adjust
while 1
waitinput
case %key=2:BREAK
If %Umessage = &WM_MOUSEMOVE
GetCursorPos(be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg&=@WindowFromPoint(x&,y&)
If erg&<>0
ScreenToClient(erg&,be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
If erg2&=Hdlg&
Create("Bitmap", Hdlg&, bmp1%, 0, 0)
OBJECT "A-2.png"'way adjust
while 1
waitinput
If %Umessage = &WM_MOUSEMOVE
GetCursorPos(be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg&=@WindowFromPoint(x&,y&)
If erg&<>0
ScreenToClient(erg&,be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg2&=@ChildWindowFromPoint(erg&,x&,y&)
case erg2&<>Hdlg& : BREAK
EndIf
EndIf
If %MousePressed
Messagebox("Das was one Click in the Image!","I n F O",4160)
SetFocus(Hdlg&)
EndIf
Wend
Create("Bitmap", Hdlg&, bmp1%, 0, 0)
OBJECT "A-1.png"'way adjust
endif
EndIf
endif
case %wmpaint:OBJECT "A-1.png"'way adjust
wend
DeleteObject bmp1%
DeleteObject bmp2%
Dispose be#
ExitGDIPlus(gdiplusToken&)'GDIPlus terminate
end
PROC OBJECT
parameters file$
ImageObject1& = gdipLoadImage(file$)'way adjust
If ImageObject1&
'and on %hWnd draw
~GdipCreateFromHWND(Hdlg&,ADDR(GraphicObject&))'any Graphics-Operationen on %hWnd
~GdipDrawImageI(GraphicObject&,ImageObject&,20,0)'Bitmap draw
'Image2 with draw
~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
Greeting Thomas |
![](/intl/i/dw.gif) |
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 12/07/11 ▲ |
|
|
|