943,691 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 623
  • C++ RSS
Feb 25th, 2009
0

Writing MSVC Plugins

Expand Post »
well, after hours apon hours of serching for this, i've come up with nothing but a few sources for some plugins[from thecodeproject.com], which don't cover what I need: Basically writing to the currently active (source) file(at the position of the cursor/caret), like so(highly simplified)
C++ Syntax (Toggle Plain Text)
  1. fprintf(pOpenDocument,"/*\n\tTime: %s\n\tDate: %s\n\tAuther: %s\n\tReason & Revision: %s\n*/",GetTime(),GetDate(),GetAuther(),GetReason());"
  2.  

I know my vc6 pro has a wizard for this, but its mfc based, which I a) lothe & b) still have no clue how to use to do the above due to a lack of documentation (or my lack of finding documentation).

So my questions are:
can anybody point me to some documentation?
is it possible to use WinAPI for this and not mfc?
any cryptic clues or help is much appreciated
Reputation Points: 8
Solved Threads: 4
Light Poster
Necrolis is offline Offline
36 posts
since Jun 2007
Feb 26th, 2009
0

Re: Writing MSVC Plugins

Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Mar 2nd, 2009
0

Re: Writing MSVC Plugins

well after a wierd turn in msdn i found this:
http://msdn.microsoft.com/en-us/library/cc138565.aspx
but i hate C#(nor am i very profficient in it)...
your link looks alot nicer jencas, but i'd like to do this in C/C++(yes i'm a picky ******* ), if worst comes to worst i'll just whip out olly and IDA....

on a side note: ms seems to have gotten better as supporting plugins:
http://www.visualstudiogallery.com/
Reputation Points: 8
Solved Threads: 4
Light Poster
Necrolis is offline Offline
36 posts
since Jun 2007
Mar 2nd, 2009
0

Re: Writing MSVC Plugins

Last edited by jencas; Mar 2nd, 2009 at 7:49 am. Reason: added forum link
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Mar 3rd, 2009
0

Re: Writing MSVC Plugins

Click to Expand / Collapse  Quote originally posted by Necrolis ...
any cryptic clues or help is much appreciated
One approach would be to
  • generate a default MFC-based add-in
  • study it so that you understand how things work
  • strip off all MFC/AFX -based stuff, converting the add-in to a standard DLL (i.e. with a DllMain(...) instead of CWinApp, etc (leave the COM-code in-place though))

A (cryptic) clue: the interfaces you'll need, are; IApplication, ITextDocument, ITextWindow and ITextSelection.

You'll get some understanding about how things are organized by looking into the #include <ObjModel\*auto.h> files.

I'm not aware about any decent documentation on the msvc 6.0 add-ins/object model. However, if you are happy with a simple add-in, providing a command or two via a command bar, then you'll probably not be missing the documentation too much.

You might also get some general insight by taking a look at
How to automate tasks by using COM objects in Visual C++
Reputation Points: 1105
Solved Threads: 389
Posting Virtuoso
mitrmkar is offline Offline
1,714 posts
since Nov 2007
Mar 4th, 2009
0

Re: Writing MSVC Plugins

well, it seems that i should have checked here sooner before i found this:
http://msdn.microsoft.com/en-us/libr...97(VS.60).aspx , time to dig into those links, thanks guys
Last edited by Necrolis; Mar 4th, 2009 at 1:25 pm.
Reputation Points: 8
Solved Threads: 4
Light Poster
Necrolis is offline Offline
36 posts
since Jun 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Simple file read test working as intended in Linux, but not Windows
Next Thread in C++ Forum Timeline: how to compare operators if they are characters.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC