And the next ...
Taking the GDWDDT example again, if we add a sprite to the GDImage Control:
CONTROL ADD $GDImageClassName, hDlg, %IDC_GDimageCTRL1, _
$MyImage1, 7, 5, 420, 190, %WS_CHILD OR %WS_VISIBLE _
OR %WS_HSCROLL OR %WS_VSCROLL, %WS_EX_LEFT OR %WS_EX_LTRREADING OR _
LOCAL hCtl AS LONG
CONTROL HANDLE hDlg, %IDC_GDimageCTRL1 TO hCtl
ZD_FillRect(ZI_GetDC(hCtl), 10,10, 50,50, RGB(255,0,0))
ZD_DrawRectangleToCtrl(hCtl, 10,10,100,100, &HFFFFFFFF, 0, %IDC_Sprite, %ZS_VISIBLE, %ZD_DRAW_FILLED)
We get a nice independant sprite rectangle overlaid, which we can move, manipulate (and remove) without affecting the underlying image. This is really cool.
1. Without adding any code to GDWDDT, hovering over the sprite changes the mouse cursor, and you can drag the sprite anywhere you want in the GDImage control. Again, very cool, EXCEPT if you don't want the user to be able to do this .... How do we prevent the mouse hover and the drag?
2. With a standard PowerBasic Image control, adding the %SS_NOTIFY attribute causes the callback to fire if the user clicks anywhere on the control. But the same does not happen with the custom control. How do we get mouseclicks on the GDImage control, and how do we get them one of the sprites?