visual-studio-2005

Creating an Open XML file in .NET - schema

I'm trying to make a report generator inside of a C# application for my boss, I came across this page and looked into RichTextBoxes and think that I can build on this idea to do what my boss is looking for. http://openxmldeveloper.org/articles/OpenXMLDocFromDotNet.aspx The issue I'm running into is their example code for the XML portion...

How to: change source directory within a VS2005 Add-In?

So, I'm writing a C# Add-In that generates C++ source files by weaving aspects into them using AspectC++. Now, I'd like to take those generated files and send them to the compiler instead of the original source... How would I do this within the Add-In? I've tried looking at the VCCLCompilerTool, VCCodeModel, and similar interfaces for...

Need advice on creating macro to format SQL scripts in Visual Studio

Hello all, I am in the process of trying to create a macro that will, through a combination of code and Regular Expressions, clean-up and apply consistant formatting to our library of SQL Scripts. My macro consists of 2 parts. The first section loops through a collection of SQL key words (select, from, where, etc..) and uses the Find o...

Why am I getting this error: not all code paths return a value?

hi im new to c# and was trying to code but getting error can anybody help me with this what am i doing wrong? using System; using System.Collections.Generic; using System.Text; namespace hodder { class Program { public static void Main() { isHodder(3); } static int isHodder(int n) ...

Having trouble enabling verticle scrolling in edit box

I'm using Visual Studio 2005 and programming a dialog-based MFC application in C++. I have an edit box and I'm trying to make it auto-scroll. When I make auto vscroll true, it still won't auto-scroll when I have too many lines in my edit box. Any ideas in what could be wrong? Is there maybe some code line I have to add to my edit box? ...

Need help adding scroll bar to edit box

I'm making an MFC dialog-based application in Visual C++ 2005. I added a scroll bar to an edit box. How do I program the scroll bar to make it work? ...

Formatting - at once - all the files in a Visual Studio project

I am interested in formatting all the files in a Visual Studio (ver. 2005) project all at once. Any idea? Currently, there is a way to format a single document by doing something like Edit->Advanced->Format Document. However, I don't see a single command to format all the files of a project all at once. I am hoping there is a macro o...

Why do my radio buttons not work?

I'm working on an MFC dialog application in Visual C++ 2005. My radio buttons are m_Small, m_Medium, and m_Large. None of them display what they are supposed to in my m_Summary edit box. What could be wrong? Here's my code. // Pizza_ProgramDlg.cpp : implementation file // #include "stdafx.h" #include "Pizza_Program.h" #include "Pi...

What is difference between Release and Debug modes in Visual Studio?

HI I want to know what's the difference between Release and Debug modes in Visual Studio while building a project? Thanks in Advance. ...

How to resolve the following C2220 error??

Hi i am getting the following error while building a project.Even though i am seeting the property as treat warning as errors to "NO" i am getting this one. errorc2220 : warning treated as error no object file is created. Can any one Help me Resolving This One. Thanks in Advance. ...

Where can I find an implementation of C99's math for Visual Studio?

I have some code that uses several math functions that exist in C99, but aren't defined in math.h or cmath that come with VS2005. Anywhere I can get a VS2005 compatible implementation of C99? ...

How to edit a file ?

Hi experts, I have a CPP file. I am using VB in VS2005. I have opened that file using the FileSystemObject. I am reading each and every line in that CPP file. I have to comment all the lines untill i encounter a return statement.I am using the scripting.textstream to read a line from the CPP file. But i have no idea as to how we can add...

Elegant way to go from list of objects to dictionary with two of the properties

i seem to write this code over and over again and wanted to see if there was a better way of doing it more generically. I start out with a list of Foo objects Foo[] foos = GenerateFoos(); I think want to create a dictionary where the key and value are both properties of Foo for example: Dictionary<string, string> fooDict = new Dict...

How to tell the preprocessor to search for a particular folder for header files, when I say #include <xyz.h>

I have around 120 header files(.h files) , and in all of them each one includes many other header files using #include , but as I kept .h files in a specific folder, preprocessor is generating filenotfound error. I moved all the .h files to the single .C file that is calling the first headerfile. One way to do is make #include as #inc...

How to work offline with TFS

Hi Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work! Is it possible to switch TFS into an offline mode in the event of such an issue? Martin ...

Visual C++ Runtime Library Linker Woes

Observe this close Scenario even though it appears to be the same as my previous questions. Still I am not getting an answer. So please don't report as a duplicate. I have a project which has 10 dependencies. First I compiled using the /MTD option in the C/C++ codegeneration section in the main project and all its dependencies are getti...

Assignments failing

I'm debugging part of a large project in Visual Studio 2005, and stepping through the code line by line. int speed = this->values.speed; int ref = this->values.ref_speed; After stepping past the first line, values.speed has a value of 61, but for some reason, speed is getting assigned the value 58. After the second line, values.ref_s...

Why is /clr incompatible with /mt and /mtd in Visual Studio?

Hi can anybody please explain for me how and why /clr is incompatible with /mtd ? What is the alternative for this? What happens internally if I use /md or /mdd ? As far as I know we don't combinedly use /clr and /mtd. Can someone explain if there is a way to do this? And please explain me how and why /clr is incompatible with /mt and ...

C# Project Type not present in Visual Studio 2005

I have been coding using Visual Studio 2005, in VB.NET for a while. No problems. Recently, I decided I wanted to start a New C# project. Upon attempting to do this, I noticed Visual Studio 2005 was missing this functionality entirely! This is exactly what I get on my screen: Also note that I have both Visual Studio 2003 and 2005 i...

Visual Studio 2005: Debug C# code from a different project?

I have a desktop application I'm developing with Visual Studio where I need to update a small part of the app on a more frequent basis. To avoid the inconvenience of deploying a new installer every time, I split the more frequently updated support functions into a separate project and compiled it as a DLL. The desktop app now loads this ...