|
-
August 7th, 2001, 07:05 AM
#1
learn to count
Goodmeurning!
Does anybody know if MSVC++ 6.0 counts the number of times that you have built your project? I'd like to mention this number in the about-dialog. (Yes, I got the idea from Napster... I know!)
TIA,
Jan
I ask this because I would like to know when I should replace my F7-key ;-)
According to the manual of my keyboard it can take 50000 presses...
-
August 7th, 2001, 07:09 AM
#2
Re: learn to count
I have a macro associated w/ a toolbar button in MSDEV. The macro looks like:
Sub VersionedBuild()
Dim s
Documents.Open "version.h", "Text"
ActiveDocument.Selection.StartOfLine
ActiveDocument.Selection.WordRight dsMove, 3
ActiveDocument.Selection.WordRight dsExtend
s = cint(ActiveDocument.Selection)
s = s + 1
ActiveDocument.Selection = cstr(s)
ActiveDocument.Save
ActiveDocument.Close
Application.Build
End Sub
And version.h looks like:
#define XVERSION 2097
and is included in stdafx.h. I use XVERSION to display the build No.
Gabriel.
_
Forever trusting who we are
And nothing else matters - Metallica
_
-
August 7th, 2001, 07:15 AM
#3
Re: learn to count
Ok, thanks for your macro!
As I've never used them before I don't know how to create one... Could you please explain?
regards,
jan
-
August 7th, 2001, 07:28 AM
#4
Re: learn to count
Macro files are placed in ...\Microsoft Visual Studio\Common\MSDev98\Macros, and have the extension .dsm. Create a new text file, call it mymacros.dsm and copy the macro there.
Then menu Tools->Customize->Add-ind and MacroFiles, check Mymacros.
Then menu Tools->Customize->Commands, category "Macros", drag the macro to the toolbar where you want it. A dialog pops up and you can assigh a button face to the macro.
Voila.
Gabriel.
_
Forever trusting who we are
And nothing else matters - Metallica
_
-
August 7th, 2001, 07:58 AM
#5
Re: learn to count
Unbelievable...
Really amazing!
You should write an article on this topic here on CodeGuru!
many thanks
Jan
-
June 10th, 2005, 01:44 AM
#6
Re: learn to count
How can we read build no. while building a.net application, is the procedure same as described above?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|