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)

fprintf(pOpenDocument,"/*\n\tTime: %s\n\tDate: %s\n\tAuther: %s\n\tReason & Revision: %s\n*/",GetTime(),GetDate(),GetAuther(),GetReason());"

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 :)

Recommended Answers

All 5 Replies

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++

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.