Sunday, 27 April 2008

How to switch between .H and .CPP files in visual studio.

I've written a macro for this, since I don't know any existing commands in VS.

Sub SwitchBetweenHeaderAndSource()
Dim oldFile As String
Dim newFile As String
oldFile = DTE.ActiveDocument.FullName
If (oldFile.EndsWith(".cpp")) Then
newFile = oldFile.Replace(".cpp", ".h")
If (oldFile.EndsWith(".h")) Then
newFile = oldFile.Replace(".h", ".cpp")
newFile = oldFile
End If
End If
Dim pi As EnvDTE.ProjectItem
pi = DTE.Solution.FindProjectItem(newFile)
If (Not pi Is Nothing) Then
End If
End Sub

You can write this macro in macro explorer, which you can find in Tools->Macros menu.
To assign a keyboard shortcut, you can go to Tools->Customize and click the Keyboard button. On that window you can find the macro and assign it a keyboard shortcut. I'm using Ctrl+"

Tuesday, 1 April 2008

This summer

I had applied to Realtime Worlds for a summer placement job. I got a quiz, and an interview today. I've got an email that says I'm accepted for a summer placement, I'm quite glad to hear that :)

I'll finish my coursework earlier and go to turkey for a three-week holiday with family&friends, and from the beginning of the June, I'll be working at RTW for three and a half months. Yee-haw cowboy!

A saying that Raymond Chen has used in this article:
- Yee-haw cowboy:
A great latin-jazz album from Ayhan Sicimoglu:
- Friends&Family: