ActiveX OnSize and OnMove messages in PowerPoint

E

EatenByAGrue

I have a simple ActiveX project I've added to my solution, generated from the
Visual Studio wizard (ActiveX MFC project). I have added C++ code to my
solution that uses the Office Object Model to add my ActiveX to any
particular slide (using Shapes.AddOLEObject). I need to know whenever my
ActiveX is moved or resized, so I figured it would be easy enough to just
listen for the appropriate events with OnMove or OnSize. Sadly, these never
get called from PowerPoint, with one exception. If I enter Slide Show mode
in PowerPoint, OnMove and OnSize immediately get called. How can I trap
these events in normal editing mode in PowerPoint?
 
E

EatenByAGrue

Unfortunately, the problem I have is that I need to modify other Shapes when
this particular Shape is moved or resized. I looked over the PPT events, but
I didn't see anything that looked like what I need. I figured that the
ActiveX object would be part of the Windows event system, but that appears to
only be valid when I'm viewing the slide show, not editing. I guess I could
just capture the WindowActivate, WindowDeactivate, and WindowSelectionChange
and handle my adjustment through them. A shame to have to go through what
seems like a less intuitive route to solve the problem, but if that's all I
have to work with then that's all I can do :) Thanks for your suggestion!
 
A

Austin Myers

Hmmm,

Couldn't you set a "mousedown" event on the control and then track the
cursors movement/position? If it changes you know the controls
position/size has been altered.


Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
E

EatenByAGrue

I tried adding a mouse listener to it, but I am not getting those messages,
either. The only event I've noticed that is actually being reported while
editing in PowerPoint is the paint. I think that it all may have to do with
OLE's difference between edit mode and user mode, but I tried overriding the
calls that set that boolean value and it never gets called, either.
 
E

EatenByAGrue

Yep, that's pretty much what I'm doing now :) Thanks for the suggestions.
As for Austin's suggestion, I tried adding a mouse listener and still got
nothing. Did I misunderstand the concept he was describing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top