|
Well I haven’t been around Code Project much for the last week. I started a new job; recently that’s been keeping me very busy.
I'm now in a first line tech support role. All I have to say is as cool as some of the apps they have they sure like to do things as if they are in the Stone Age.
Oh well…
|
|
|
|
|
[small rant]
Who is the mumbling moron who wrote the “HTML Help Workshop” must have been a lawyer? I'm trying to create a fairly simple HTML help file and this waste of not only CPU cycles but disk space is causing nothing but problems. When ever I create a nice ordered table of contents (TOC) it trashes it.
Will Microsoft ever give us (developers) a Help system that works and is easy to use? I don’t care how pretty it looks I just want something that works. If I wasn’t so dang busy I would create my own little system.
I would rather use IE .5 than this junk. At least I can use Programmers Note pad to create the needed files and compile it on the command line. Now what are those darn switches?
[/small rant]
|
|
|
|
|
|
I said if I found anything useful in VS2005 I would comment on it, well believe it or not I did find something useful.
They added some useful features to the context menu while coding.
- With a class open if you right click and scroll to “Go To Header File”, it actually seems to always take you to the correct header.
- Again open a class scroll to Outlining, lots of useful stuff there mostly “Collapse to Definitions”
- I love the new (I think its new anyways) “Insert Trace Point” what a great idea!
- The “Find All References” is handy as well.
The new (for me its new anyways) way of creating menus is great! It makes creating menus even easier than VS6.
The class view filters seem to help, find what you’re looking for.
|
|
|
|
|
There really isn’t any reason for this post beyond something I recently struggled with. I don’t think it’s really worth an article but it is worth having out there for others to see.
While recently working on a small dialog based application I needed to add a menu bar as part of the main dialog. Some of the menu options in that dialog needed to have multi state (a check mark). Now normally in a SDI or MDI application this is an easy task. You just need to handle the ON_UPDATE_COMMAND_UI and set the pCmdUI->SetCheck(Int value); to the correct value 0 for unchecked and 1 for checked. Pretty simple stuff right? Well as it turns out in a dialog based application this event doesn’t occur you need to handle ON_WM_INITMENUPOPUP() which happens when the menu gets created (when the user clicks / selects the menu this gets called) and dispatch the appropriate message.
See MSDN Knowledge abase article Q242577 or this (MSDN) Link[^] here, the code provided in the link works. Just plug it in and add the ON_WM_INITMENUPOPUP() message handler to point at that code and your ON_UPDATE_COMMAND_UI message handlers will work.
You cannot change the state of a menu item from its command user-interface handler if the menu is attached to a dialog box in Visual C++[^]
|
|
|
|
|
Just made my 800th post...
CP is a cool place...
|
|
|
|
|
I got a copy of VS2005 Standard edition for attending the MS Visual Studio Launch party a few months ago. Well I'm finally getting around to writing something with it.
I'm tired of both Win Amp and Media player. Neither one of them have the one feature I really want. Which is a Queue; I really wanted an MP3 player that would work just like an old Juke box. Nothing terrible special so I figured that would be a decent little app to cut my teeth with VS2005. Under development MP3Caddy[^]
All I have to say is I'm very disappointed with VS2005; it’s taken a couple of steps back from VS6. About the only things they added to it for MFC C++ developers are a prettier interface.
What I dislike
- Adding / Managing Message maps in VS2005 is a joke. Why should I always have to go back and open the dialog / form to add a message map when I used to be able to do it from right clicking on the class it self?
- Where is the darn Class Wizard? The class wizard was a great way to manage variables. Why didn’t they improve upon its design instead of just nixing it
- It seems that the new tool for adding variables / member functions needs a lot of work, first it occasionally flakes out doest care what I choose for scope it adds it as something completely different. What’s even worse is when it does add the new item it creates a new protected, private, public label (I cant seem to recall the correct term for the scope operator so label will have to suffice) for it. Why not put the new variable / function in an existing label?
- Could the warning messages from the complier get any vaguer?
- The MSDN just flat out sucks! I like the UI, even though it’s slow as molasses in February.
- Macros, ugg I can’t seem to figure out how to record a macro (a non temporary one) I have little macro I use for adding comments, it formats them just the way I like. No more I guess.
- Release versions, sigh; don’t get me started. So in order to save end users from DLL hell we put developers through install hell. I just don’t get it, and I haven’t found anything that clues me it to the magic of creating installer packages. Well at least with distributing the MFC8.0 I can run my apps on Windows 2000 without a problem.
- Intelisence just sucks now, its more useless than the VS6 version. I wonder if Whole Tomato will make a version of their Intelisence for VS2005 for us C++ developers.
- Why is the code snippet library only available for C# and VB.NET?
- Why on earth can’t I double click on the very top title bar and have it switch from maximized / restore? Come on VS team take a look at the Windows UI standards.
- I better stop now before you get the opinion I hate VS2005, maybe I need to learn C# in order to better understand what is so great about VS2005.
What I like.
- The STL compiles without tons of warning messages.
- The complier is a lot stricter about what it accepts and its warning are more verbose.
- The tabbed interface.
- Auto hiding tool bars, even though they can be a royal pain. It’s still a nice feature.
If I find more I like / dislike about VS2005 I will try and update this. I'm sure others have a longer list of like / dislikes and they are probably in a better position to complain. I just needed to vent a little.
Why oh why can’t I drag a class onto the current document and have VS just figure out I want to use that as a member, and provide me a little input box to type in a name for it. Have VS do the necessary include and add it as a member variable. Now that would help (at least me).
I need a new sig, got one handy?
-- modified at 2:09 Thursday 26th January, 2006
|
|
|
|
|
I just started using surfulater[^]by Neville (A fellow Code Project Member), what a very slick little application. It’s a very well designed and laid out.
Surfulater is a little knowledge base for webpages and anything else you can stuff into it (which is anything). A few years ago I wrote my own knowledge base to keep track of source code snippets and how tos but I think surfulater is going to be a solid replacement for it. It’s going to take some time to migrate all of that information from my knowledge base to Surfulater but it will happen.
Its speed and unobtrusiveness are its greatest features. Surfulater just works without waiting for it.
My only complaint is the database in which stuff is stored is a closed format. This isn't a big deal but I just like to see how things are stored and it would make it easier for me to migrate my information. Oh well.
My hats off to Neville surfulater[^]
|
|
|
|
|
You just inspired me to check this out. Seems like a cool tool. I always thought from the title it meant surf a website later. Now I'm going to have to tinker.
So far I like your blog. Most people blog in such a boring way. Yours is good. It meanders a lot and I like that.
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|
|
code-frog wrote: I always thought from the title it meant surf a website later.
That's what I first thought when I saw Neville post about it. Turns out to be a lot more functional than that.
code-frog wrote: So far I like your blog. Most people blog in such a boring way. Yours is good. It meanders a lot and I like that.
Well I tend to meander through life so it’s only fair that my Blog does.
Funny part of it is I have another Blog that I use; it’s just not visible to the rest of the world (it reside on my server at home). This one is reserved for when I'm away from home and need to vent or exclaim something I just figured out.
Do you still actively post at yours? The few times I have checked it I haven’t seen any activity or have you moved on to a “real” blog?
-- modified at 4:41 Thursday 26th January, 2006
|
|
|
|
|
code-frog wrote: You just inspired me to check this out. Seems like a cool tool.
Tis. Comments, barbs, suggestions most welcome.
code-frog wrote: I always thought from the title it meant surf a website later.
The name is unfortunately causing me some grief.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
|
|
Neville Franks wrote: Thanks for posting about Surfulater
No problem.
Neville Franks wrote: Surfulater uses stock standard XML for storing all text you clip from Webpages or Windows Apps. Binary stuff like images and attachments are stored in an open source database. I touch on this here: http://www.surfulater.com/compareus.html[^]
Thanks, I will look into that.
|
|
|
|
|
Well I went to the oral surgeon today, got all four of my wisdom teeth pulled out. I had them put me out for the procedure. I must admit I don’t know what everyone is complaining about the pain is nowhere near as bad as having those teeth in. the worst part thus far has been the after effects of the Novocain. It’s been almost 9 hours at this point and my jaw is still numb. Its great to do my impression of an overly drunk person, can't quite keep all of the water going down. Some of it invariably ends up dribbling out the side of my mouth.
Well the best part of this is my boss is a ninny and let me take a little over a week off to recover, I should be back up and ready to do some work tomorrow.
Well the strangest thing just happened the Oral Surgeon who pulled my teeth out just called to check and see how I was doing. I was pretty decent (esp. how much this operation cost)
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
-- modified at 21:50 Wednesday 28th December, 2005
|
|
|
|
|
Well a friend of mine came to me last week looking for a small script that would backup a directory for him. I hammered this out in a few hours (most of that time was spent looking for how to invoke the built in XP zipping interface). Rather than just forget about it I thought I would post it here in case anyone else could use something similar.
To use it, copy the text below into a text file rename it to .vbs, fill in the variables strDirToBack and strDirNewloc and choose whether or not you want the folder to be zipped or not. An incrementing number will be added to the end of the resulting file / folder. There isn’t much in the way of error handling, if you have trouble let me know and I will try and help.
Option Explicit
'***************************************************************************'
'*** Quick Back Up by Stephan
'***
'*** No warranties express or implied use at your own risk
'***************************************************************************'
'********************************************************************************'
'*** if bZip is set to true then Quick Zip will try and use built in windows ***'
'*** Zipping functionality (Windows XP and Newer Only), other wise Quick zip ***'
'*** will try and find WinZip to add the folders to a zip archive. If neither ***'
'*** of these are available then Quick zip will copy the folders directly ***'
'*** appending a numeric integer to end of the folder ***'
'*** The last folder name of the destination directory will be used as the zip ***'
'*** File name or folder name if zipping is not used ***'
'*** Exp, the directory to back up "C:\Test" backed up to "C:\Temp\Test will ***'
'*** become "C:\Temp\Test1.zip ***'
'********************************************************************************'
'*** The directory to back up *** 'SFD
const strDirToBack = "C:\eia"
'**** The new location ***'
const strDirNewloc = "C:\TEMP\eia"
'*** Zip the files Using Windows Zip ***'
const bZip = true
'***************************************************************************'
'*** App Variables, Do No modifiy ***'
Dim objFSO
'*** End App Vars ***'
'***************************************************************************'
Call main
'***************************************************************************'
'*** Start the work *** SFD 12/17/2005
'***************************************************************************'
sub main()
dim strNum
dim strLoc
dim objShell
Set objFSO = CreateObject("Scripting.FileSystemObject")
strNum = GetFileNumber()
strLoc = GetWinZipLoc()
if(bZip) then
if(CreateZip(strDirNewLoc & strNum & ".zip ")) Then
AddFilesZip strDirNewLoc & strNum & ".zip ", strDirToBack
end if
elseif(Len(strLoc) > 0) then
'*** Winzip is installed ***'
set objShell = CreateObject("Shell.Application")
strLoc = strLoc & " -a " & strDirNewLoc & strNum & ".zip " & strDirToBack
objshell.Open strLoc
set objShell = Nothing
else
'*** WinZip is not installed Just copy the folder ***'
objFSO.CopyFolder strDirToBack, strDirNewloc & strNum
end if
set objFSO = nothing
end sub
'***************************************************************************'
'*** Get File Number *** SFD 12/17/2005
'***************************************************************************'
function GetFileNumber()
dim objTextFile
dim strValue
if(GetExists("foldernumber.dat") = false) then
Set objTextFile = objFSO.CreateTextFile("foldernumber.dat")
objTextFile.WriteLine("0")
objTextFile.Close()
Set objTextFile = NOthing
end if
Set objTextFile = objFSO.OpenTextFile("foldernumber.dat")
strValue = objTextFile.ReadLine()
objTextFile.Close
set objTextFile = nothing
if(len(strValue) < 1) or (IsNumeric(strValue) = False) then
'**** Error ***'
strValue = 0
end if
strValue = strValue + 1
call SetFileNumber(strValue)
GetFileNumber = strValue
end function
'***************************************************************************'
'*** Get File Number *** SFD 12/17/2005
'***************************************************************************'
sub SetFileNumber(strNewNumber)
dim objTextFile
Set objTextFile = objFSO.OpenTextFile("foldernumber.dat", 2, False )
objTextFile.WriteLine(strNewNumber)
objTextFile.Close()
set objTextFile = nothing
end sub
'***************************************************************************'
'*** Does the file exists *** SFD 12/17/2005
'***************************************************************************'
function GetExists(str)
GetExists = objFSO.fileexists(str)
end function
'***************************************************************************'
'*** Get Location of Winzip from Registry *** SFD 12/17/2005
'***************************************************************************'
function GetWinZipLoc()
On Error Resume Next
dim strWinZip
dim objRegEdit
strWinZip = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip32.exe"
Set objRegEdit = CreateObject("WScript.Shell")
strWinZip = vbNullString
strWinZip = objRegEdit.RegRead(strWinZip)
Set ObjRegEdit = Nothing
GetWinZipLoc = strWinZip
end function
'***************************************************************************'
'*** Create The Zip File *** SFD 12/17/2005
'***************************************************************************'
function CreateZip(strLoc)
On Error Resume Next
dim strHex
dim i
dim objTextFile
CreateZip = true
'Create the basis of a zip file.
Set objTextFile = objFSO.CreateTextFile(strLoc, True)
strHex = Array(80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
strLoc = vbNullstring
For i = 0 To UBound(strHex)
strLoc = strLoc & Chr(strHex(i))
Next
objTextFile.Write strLoc
objTextFile.Close
Set objTextFile = Nothing
if err.number <> 0 then
CreateZip = False
end if
end function
'***************************************************************************'
'*** Add Files to Zip *** SFD 12/17/2005
'***************************************************************************'
function AddFilesZip(strLoc, strback)
On Error Resume Next
dim objApp
dim objZip
Set objApp = CreateObject("Shell.Application")
Set objZip = objApp.NameSpace(strback)
If Not objZip Is Nothing Then
objApp.NameSpace(strLoc).CopyHere objZip.Items
End If
wScript.Sleep(5000)
Set objZip = Nothing
do while(objZip is Nothing)
wscript.sleep 3000
loop
Set objZip = Nothing
Set objApp = Nothing
If Err.number <> 0 then
msgbox err.description
err.clear
End If
end function
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
|
Yea, I tried it, it works well for what it was designed to do. My personal complaint about it was no logging and I never did figure out how to set up a schedule for it run.
Do you remember the first draft for the article idea I'm kicking around? Well one of your comments was something to the effect of me being a minimalist. I really am and the friend who I wrote this for is one also. Why rely on yet another tool when windows has built in scripting capability? Besides, SyncToy doesn’t compress the files it copies; it’s a 1 to 1 copy. What if you want a daily history of a directory? I should really update the script here as I have modified it since I posted it.
|
|
|
|
|
Well it’s been almost a week since the Microsoft VS2005 launch party. This is the first time I have ever attended such an event. While most of the seminars were not all that real informative I did like going. The new features of VS2005 from what I saw of the presentation where pretty cool.
I am very stoked about getting VS2005 installed on my development machine but first I need to add a DVD-Rom drive to it. With the holidays being here already I don’t have the spare cash just go out and buy one.
I cross my fingers that projects in VS2005 with STL code will cleanly compile. Right now using VS6 to compile any code with STL results in tons of errors and the thought of purchasing the updated libs from Dunkinware seem out of reach.
It would sure be nice to find a few more seminars to attend throughout the year. It’s nice to get out and see what others are doing.
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
This afternoon I was experimenting with Avants (Avant Browser[^]) news feed reader. When I pointed it at Code Projects Blog space and started reading through other CP members blogs. I was amazed at the sheer number of help questions people had posed in their blog space. I have to wonder if some folks really should have a compiler if they can’t figure out the difference between a blog and a programming forum. Now some of the questions where legit, wtf type stuff. Just about all of the questions could have easily been solved with a quick MSDN search or even a Google search.
I truly hope a lot of these folks are young students somewhere attempting to figure out the whole programming thing. Other wise the whole world is just getting bleaker and bleaker.
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
Testing the new sig...
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
Some of the Message board icons I have figured out. There are more icons, as I firgure them out I will update this post.
==
==
==
==
==
==
==
==
{yes indeed I am very bored}
DEBUGGING : Removing the needles from the haystack.
-- modified at 0:51 Sunday 25th December, 2005
|
|
|
|
|
While I have been sitting here idly at work over the last few days I have been hacking together a small VB script to backup my SVN repository. I would rather not install any other dependencies on my windows server. So using the python scripts provided with SVN are out of the question. So far it looks like it just might work, I haven’t tested it. As soon as I have tested it I will post it here. Maybe someone else will find it and help them.
My thought for the script was simple; provide a script that would make a backup of the repository every day and delete any copies older than a designated number of days. It should also keep a log of events. Sounds simple enough, and indeed the script is very simple. I should really add in the capability to monitor how full the destination drive is. After all in my circumstance the backups will be pushed to a zip 250 drive. Let’s just hope it all ends up working…
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Life is back to normal, well that is normal for me. I finally have my computers / servers back up and running. Everything seems to have made it though the move unscaved.
Before I packed everything up I was in the middle of finally adding the 2003 Platform SDK to my copy of VS. Well it wasn’t going very well, I some how got things broken (I know how I did it I just don’t want to admit it). That’s all fixed now, VS still isn’t using the Platform SDK but at least I can compile sources again.
The problem I seemed to be having with the platform SDK is I had a beta copy of VS.NET 2002, yup that’s right VS.NET 2002 beta. Don’t remember where I got it but it was horrible. Never did like the UI, it just felt very clunky. I still like VS6. Anyways the SDK updater was updating VS.NET 2002. I tried manually updating VS6 but that’s when things when awry.
I was just over looking at the prices for VS.NET 2005, the standard version looks very reasonable (well compared to the rest of the versions) priced for what I need. However, after all of the groaning (rightfully so might I add) in the lounge about VS 2005 I'm a little hesitant to go out and buy a copy. I'm still not .NET enabled but that’s something I will need to change here quickly.
The VS.NET 2005 launch is coming to my area next month and I have signed up to attend. From what I have heard they will be giving away a copy of VS. I think I will use that opportunity to experiment with it. Best part of that is it’s supposed to be free.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Well it took more than a weekend but I have finally moved. I hate moving, I need a full day to set up all of my computer equipment. Sadly it doesn’t look like that’s going to happen anytime soon.
I'm so going through with drawls; I haven’t written any code in a couple of weeks now.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Sadly I haven’t been able to do any type of development work not in about a week. It’s driving me absolutely batty. I'm moving here in a few days so most of my computers are packed up ready to go to the next apartment.
If this process takes much longer my girlfriend is going to have to admit me to the local computer shop for a few days, so I can recover.
On a related note if you ever feel like your life is in a rut and you need a little change. Move, for about two weeks you will have plenty to do. The only good thing is I get to completely redesign my work space.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|