How do I get the images in the location the mouse pointer is in?

Asked

Viewed 132 times

1

I need to maintain a system that was originally developed in and I’m passing to .

The system uses the CS2 Indesign api, whose documentation is very bad.

Part of the program consists of dragging some images from a list and putting them in the open Indesign file. For this I am using the place and it’s working. But I need to make the images appear exactly where the mouse pointer is. And I’m only managing to make it appear at a specific point that I go through.

Today it’s like this:

Dim myWindow = myDesign.ActiveWindow
Dim mySpread As InDesign.Spread = myWindow.activeSpread

Dim posFrame() As Integer = {0, 0}
Dim myImage As InDesign.PDF = mySpread.Place(nome, posFrame)

I mean, I’m taking the spread active, and in it placing the image at the point 0,0. I need it to appear in the mouse location, no matter where the mouse is.

1 answer

1

  • 1

    Even if this link is a good suggestion, this answer will not be valid if one day the link fails. Also, it’s important for the community to have content right here. It would be better to include more details in your reply; Could you do that? A summary of the content of the link would help a lot! Learn more about this subject in our Community FAQ: Answers that only contain links are good?

  • Thanks, man, only this way, I don’t know so much about C++, but it seems to me that on the 250 line he’s using the Util object calling the Getstrokebounds method. So who really is taking the position is this method, which is not detailed in this code. I mean, it still hasn’t helped me, rs... You have the rest of the code?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.