HOWTO: Automate Excel Events From C++ Without Using MFC or #import

dharmeshvasant
dharmeshvasant used Ask the Experts™
on
Hi
hw r u..?
wassup gr8?
actually i need ur help....in vc++
i knew how to open excel application in vc++ console applicaton.
now purpose is to make invisible toolbars(i.e. commandbars) and disable right mouse click (i.e. events ) and disable ctrl + c and ctrl + v and Print Screen
so plz help me for it.
bye for now..
Dharmesh
dharmeshvasant@rediffmail.com
   
 
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You could browse through windows belonging to Excel and when you encounter toolbar window, set it to unvisible.
This shouldn't be very complicated.
You coud do it also by using hooks (WH_CBT, listening for HCBT_ACTIVATE).
Anyway for other things you should use hooks.
With keyboard hook you could disable keys you want to be disabled, and mouse right button with mouse hook.
Method with hooks is a little bit advanced, you should put hooks functions into DLL, since those hooks will consider other process (Excel).
For communication with Excel you could use DDE messages, but I am not sure if you can achive these tasks with it.

Regards
Pawel.


Commented:
This question didn't show any activity for more than 21 days. I will ask Community Support to close it unless you finalize it yourself within 7 days.
You can always request to keep this question open. But remember, experts can only help if you provide feedback to their comments.
Unless there is objection or further activity,  I will suggest to accept

    "PawelSokolowski"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
========
Werner
Force accepted

** Mindphaser - Community Support Moderator **

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial