I am trying to create a basic entertainment map editor that consists of scrollbox and paintbox (for drawing a grid).
In the OnMouseDown event for paintbox, I create images at runtime and add them inside the scroll, the mesh paint is painted over the images (because if the grid was on the back, it would just look nice).
Here is an example screen:

My question will solve two of my problems in one.
- I need to be able to drag and drop images around at runtime.
- I also need to be able to display the X and Y positions of the image as information.
That's where my problem is, to solve the problems above, I first need to get the image under the mouse cursor. But since I draw my paintbox over the images, the cursor will only “see” the paint grid, not the main images.
I experimented with copying the paintbox grid in TImage, but it all went wrong and I had errors in memory. The size of the cards can be quite large, so placing the grid in a bitmap is not ideal due to memory and limitations, etc.
The grid should go on top, otherwise it will look something like this:

What hides the grid, and I don't want this to happen.
So, how can I see the past color and go to the images below them using FindVCLWindow or something similar?
user1175743
source share