Click here to Skip to main content
Click here to Skip to main content

MoreFast Add-In for faster Development

, , 8 Aug 2002
Rate this:
Please Sign up or sign in to vote.
A VS addin that does a variety of different tasks to make programming easier.

Sample Image

Why I Developed This Addin

I searched CodeProject and CodeGuru for an Add-In which will do all the basic things. But I failed. Then I decided to make one appropriate Add-Ins which would cover all small basic functions and so the story begins...

I called this utility MoreFast Add-In. Why did I call it this? Use this add-ins and see how fast and easily you can develop code. I haven't developed a lot of functionality but I am sure that whatever I developed is very useful. Because it is available in one place, lots of macros and lots of add-ins are not needed after installing this.

Functions Developed in the Add-Ins

Add Line Comments: Add line comments to selected text. If text is not selected then comments is added to current line and caret goes to next line.

Remove Line Comments: Removes line comments from selected text. If text is not selected then comments is removed from current line (if it exists) and caret goes to next line.

Add Block Comments: Add Block comments to selected text. If text is not selected then command will not executed.

/*
.... Selected Lines Comes Between This
....
*/
Remove Block Comments: Remove Block comments from selected text. If text is not selected nothing will happen.

Open Project Folder: Open project folder under which you are working. It opens a folder in the explorer window with your project directory.

Count Lines Of Project: Counts total lines (Comments,Empty and Your Code) in your current project. I took this from "Counting Lines in a MS VC++ 6.0 project By _declspec and sfynx". I am supplying LineCounter.exe with my zip file. If _declspec and sfynx has any problem, mail me. I will remove and give path to your zip files, no problem. For proper execution of this commands exe should be in a predetermined path. Please read installation topic.

Switch From H->CPP and CPP->H: This command switches files from the header to cpp and vice versa. Suppose you are working in file MyFile.h. Then execution of this command opens MyFile.cpp. It can switch both ways, so you can also switch from MyFile.cpp to MyFile.h.

Switch Case: Switch Case of Current Text Selection. If You have selected 

cDIALOG *M_mYdIALOG;

This command converts all uppercase letter to lowercase and vice versa. so your selection, after execution of this command look like this

CDialog *m_MyDialog;
Add/Remove BookMark: This command adds or removes bookmarks. All Bookmarks are added in bookmarks.bm in your project directory. So every time you open project it reads from that file and provides your bookmarks every time. This menu contains Add, Remove and bookmarks. Place the cursor at your desired line and Press Add. It display dialog box. Enter a friendly name for remembering your bookmarks. And When you press remove, It display list box with all bookmarks present. Select and Remove desired bookmark.

Format Code: This command indents selected code. This function uses Microsoft format code function (SmartFormat).

Add Code Template: This feature is the best feature of all. This is very useful. Select your code which you use most of times. Then press this button. It will ask you about a friendly name to store your template in the database. For proper usage of this function ensure the database file is in the proper folder. See Installation for further details.

Paste Code Template: This command takes all templates from database and shows you a menu with the friendly names (which you have entered). Select a Friendly name and it will paste the code at the caret position from the database.

Service Pack Version: It will show you the installed service pack for visual C++.

Shows Option Dialog: It will show you the Configuration Dialog. You can set lot of configuration of morefast...

AutoSave: This Feature implement an autosave feature. It saves at a specified time interval. I haven't implemented a Configuration Dialog. So if you want to edit the values of the autosave feature you must set it from option dialog. 

Save/Add Files In/From project: This function is useful for user who want to save whole class for future use. You can easily save files by pressing save button. It will display file open dialog. Select files which you want. Click Open button to save that files. For add files in to your project from saved files, click on addFiles Button. It will display list box with saved files. Select files to add and press add to project button.

SomeUtilities: (Updated in Ver 2.50) This Function is very useful now. It contain useful macro to paste information. when you want some code to take in to loop or in define block. Just select block and select from menu. it will place selected loop and selected code under that loop. It contains

  • Logic Constructs
  • # directive
  • High Level Templates
  • Code Fragments.

This utilities has been updated by Ronald Sanderson. Thanks to him for contributing to MoreFast. Some of this utilities are still under development.

Code Related Information

CDSAddIn::OnConnection Method:

I Register the Database with this code in the OnConnection method. If the Database is already registered, SQLConfigDataSource returns FALSE. But if the Database is not registered then it registers a database named MoreFastCT.

CString dbpath = m_filepath;
dbpath = dbpath +"\\ct.mdb";
char* szDesc;
int mlen;
szDesc=new char[256];
sprintf(szDesc,"DSN=%s* DESCRIPTION=TOC support source* DBQ=%s* "
               "FIL=MicrosoftAccess* DEFAULTDIR=%s** ",
        "MoreFastCT",dbpath.GetBuffer(1),m_filepath.GetBuffer(1));
mlen = strlen(szDesc);
for (int i=0; i<mlen; i++)
{
	if (szDesc[i] == '*')
		szDesc[i] = '\0';
}
SQLConfigDataSource(NULL,ODBC_ADD_DSN,
                    "Microsoft Access Driver (*.mdb)\0",(LPCSTR)szDesc);
This code is for the AutoSave Feature. I have copied this code from the AutoSave Add-In from CodeProject.com. I have forgotten the authors name. Sorry...
gTimer = new TimerWindow;
gTimer->setApplication(pApplication);
// This will also start the timer save events based on the initial values
gTimer->Create(NULL, "Timer Window", WS_OVERLAPPEDWINDOW & ~WS_VISIBLE);

gTimer->setPeriod(5);
gTimer->setSaveFiles(TRUE);
gTimer->setSaveWorkspace(TRUE);
If more help is needed to understand code then mail me at my contact address.

Installation Steps

  1. Unzip MoreFast.dll to any folder. Suppose you unzipped it in C:\MoreFastAddIn.
  2. Now Open Visual C++. Go To Menu Tools->Customize. In the 'Customize' dialog box click on Add-Ins and Macro Files tab. Click on Browse button. Specify path of extracted MoreFast.dll and click OK. (In my case I will browse to the  folder C:\MoreFastAddIn and specify MoreFast.dll path in that directory.)
  3. Close the customize dialog. And you are done.
  4. Open the HTML File (which is in the extracted directory) which contains some help about this Add-Ins and read it before proceeding. Please read I have spent 2 hours for it...please read...
  5. This step is not useful but I should say it. Find more and more bugs and send me. I will be very happy if bugs will arrive. It will give me inspiration to develop such utilities.
  6. Now go to your work after reading known bugs/Issues.

Known Bugs/Issues

Issues
  • Only Tested With Visual C++ 6.0.
  • Only Tested With Windows 2000.
  • Only Tested With Access 2000.
  • Error/Information MessageBox Are Not Up To The Mark.
  • It Is Not Fully Tested And Debugged.
  • Toolbar Is Not Good As Our Eye Wants To See.
  • Option Dialog Is Not Implemented In This Version Due To Time Problem.
  • You Have To Load This Addin. In Future Version I Am Thinking About Setup.exe Which Will Do All The Things.
  • If the Database Connection Fails, it displays a MessageBox, Go to the Option Dialog And Set the Database Name. (Database is stored in the path where you copied addin)

Bugs

  • It Sometimes Leaves Msdev.exe In Memory. I Haven't Seen This Often. It Will Not Leave Any Memory Leaks. I Have Checked About Memory Leaks.
  • sometimes Bookmarks.bm Is Not Created Under Project Directory. And It Will Create Problem(i Haven't Faced Yet).
  • database Is In Access So You Should Load Access Driver. In Windows 2000 , It Will Work Without Installing MSAccess.

Finally

Dear Friends,
I think I have improved a lot of Morefast. And now I think I will freeze it here. Because it will take too much time to make changes on the web . mail me for issues on: manish_ld@rediffmail.com I will try to resolve and give you binary.
VISIT My WEB : http://www21.brinkster.com/CManish

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Authors

Manish Pansiniya
Founder IntelliPro Solutions Pvt. Ltd.
India India
A 8 or something in .NET, living in Ahmedabad, India owned IntelliPro Solutions Pvt. Ltd..
 
Currently working on .NET technologies, MVC and Silverlight.
 
My little blog is for helping community with the solution for problems or helping them to understand new technology. You can reach to my blog at http://maniish.wordpress.com.
 
To contact me, post comment here or email me at manish AT iprospl.com
Group type: Organisation (No members)


Follow on   Twitter

Bhavesh Pethani

United States United States
No Biography provided

Comments and Discussions

 
QuestionDllRegisterServer returns an error Pinmemberjingtihg25-Mar-09 18:55 
AnswerRe: DllRegisterServer returns an error PinmemberManish Pansiniya26-Mar-09 8:34 
AnswerRe: DllRegisterServer returns an error PinmemberLAT28-Feb-13 8:29 
Generalcan't find the source Pinmemberjingtihg22-Apr-08 16:16 
GeneralRe: can't find the source PinmemberManish Pansiniya22-Apr-08 18:38 
GeneralRe: can't find the source Pinmemberjingtihg29-Apr-08 21:18 
GeneralProblem in HToCPPToH when working with dirs including a dot Pinmembermycodeproject30-May-07 1:11 
GeneralRe: Problem in HToCPPToH when working with dirs including a dot Pinmembermycodeproject30-May-07 1:13 
GeneralRe: Problem in HToCPPToH when working with dirs including a dot PinmemberManish Pansiniya30-May-07 4:36 
GeneralTry DevExtra Pinmemberkodespace30-Jan-07 21:24 
GeneralRe: Try DevExtra PinmemberManish Pansiniya31-Jan-07 6:22 
Generaldisappointing that come options are not settable Pinmemberjabobian22-Oct-05 1:42 
GeneralWonderful job and Bug report (w/ possible fix) for folders and/or files have one or more dots in their names Pinmemberseazi3-Jul-05 13:43 
Generala problem Pinmemberzkong3-Oct-04 16:47 
GeneralC++ .NET version PinmemberGian12-Mar-04 2:50 
GeneralGood work PinmemberNetPointerIN16-Sep-03 10:25 
QuestionGreet work! Gives a homepage for newer versions? PinmemberCodeFlatter17-Jun-03 10:39 
AnswerRe: Greet work! Gives a homepage for newer versions? PinmemberManish P17-Jun-03 19:55 
General[Bug?] [Crash] HeaderToCpp Pinmembermicode10-Apr-03 3:36 
GeneralRe: [Bug?] [Crash] HeaderToCpp PinmemberManish P10-Apr-03 19:00 
GeneralRe: [Bug?] [Crash] HeaderToCpp Pinmemberullid19-Apr-04 5:09 
Generaladding menu items to (right click) context menues Pinmemberrobinraul12-Mar-03 12:05 
GeneralHUH PinmemberLe Ridder Noir30-Jan-03 2:10 
GeneralRe: HUH PinmemberManish P30-Jan-03 18:01 
GeneralGreat - Thanks for this - I have a suggestion Pinmembertony_bandero10-Dec-02 1:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 9 Aug 2002
Article Copyright 2001 by Manish Pansiniya, Bhavesh Pethani
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid