Writing MSVC Plugins

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jun 2007
Posts: 36
Reputation: Necrolis is an unknown quantity at this point 
Solved Threads: 4
Necrolis's Avatar
Necrolis Necrolis is offline Offline
Light Poster

Writing MSVC Plugins

 
0
  #1
Feb 25th, 2009
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)
  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
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 360
Reputation: jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice 
Solved Threads: 69
jencas jencas is offline Offline
Posting Whiz

Re: Writing MSVC Plugins

 
0
  #2
Feb 26th, 2009
If you are forced to reinvent the wheel at least try to invent a better one!

Please use code tags - Please mark solved threads as solved
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 36
Reputation: Necrolis is an unknown quantity at this point 
Solved Threads: 4
Necrolis's Avatar
Necrolis Necrolis is offline Offline
Light Poster

Re: Writing MSVC Plugins

 
0
  #3
Mar 2nd, 2009
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/
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 360
Reputation: jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice 
Solved Threads: 69
jencas jencas is offline Offline
Posting Whiz

Re: Writing MSVC Plugins

 
0
  #4
Mar 2nd, 2009
Last edited by jencas; Mar 2nd, 2009 at 7:49 am. Reason: added forum link
If you are forced to reinvent the wheel at least try to invent a better one!

Please use code tags - Please mark solved threads as solved
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 981
Reputation: mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice 
Solved Threads: 210
mitrmkar mitrmkar is offline Offline
Posting Shark

Re: Writing MSVC Plugins

 
0
  #5
Mar 3rd, 2009
Originally Posted by Necrolis View Post
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++
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 36
Reputation: Necrolis is an unknown quantity at this point 
Solved Threads: 4
Necrolis's Avatar
Necrolis Necrolis is offline Offline
Light Poster

Re: Writing MSVC Plugins

 
0
  #6
Mar 4th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 454 | Replies: 5
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC