jreihsen's Q&A profile
Visual C++ problem in including fstream
i have included fstream az below but i can not use it's contents: // teststream.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <fstream> int _tmain ( int argc , _TCHAR * argv []) { ifstream f ; return 0 ; } according to this code i recieve the following error: indeclared identifier: ifstream ifstream is defined within the std namespace. You can fix your code with either of the following: std::ifstream f; or #include <fstream> using namespace std; ...Show All
Windows Forms DrawGrid and SnapToGrid
Hi Is there a way to set the SnapToGrid and DrawGrid properties to false by default. I know that it can be done thru VS.Nets Tools -> Options menu. But i need to programatically set the above properties to false Actually I have a custom form which will be inherited by it's users. So when the user loads the form I want that these prop ...Show All
Visual C++ Port in use!
Hello, I am working with a database program(client-server) developed using visual studio.When i install the program and open the database, i get the error message "Port in use".But this is not the case when i run the program from the visual studio.In my code m_server.ConnectTemplate(clsid, pDocTemplate, FALSE); Can anybody explain me, whether setting the parameter to TRUE could help in anyway I have very less experience with VC++. The error message can be avoided if i set in my ini data EnableWebService to 0.But i need that for my client programm to accesss the database.I tried setting Port in ini data to "nobinding". ...Show All
Visual Studio VSS Lan Service working randomly
Hi, The Lan Booster service works randomly here. Sometimes everything is ok, and sometimes, for the very same operations, for the same database/project and on the same system, I get the following message: Unable to use SourceSafe LAN service, performance of SourceSafe operations will not be optimal. The service is running on the system hosting the database. Known problem I'm not very familiar with DFS, but I think that you're accessing the database with a "generic" path, something like \\domain\dfsroot\vss , isn't it If yes, VSS LAN service is not going to work. The client takes the databae path in the form \\server ...Show All
Smart Device Development All controls are grey in the toolbox
I'm trying to develop a device application for Pocket PC 2003 but I can't drag any controls onto the form. All controls are grey/disabled in the toolbox. Resetting it doesn't help. Right-clicking and choosing show all controls doesn't help either. Reset all settings doesn't help either. Please fill in some blanks so we could help you: I'm using VS 200______________ version ________ Note: can see that in About dialog. I'm using ____________ programming language. I'm using NETCF V_ project type. Note: in VS 2003 all projects are V1, in VS 2005 projects with (1.0) near them are V1, others are ...Show All
Windows Forms Updating image of single listview item?
Hi is there a way to update just a single item instead of the whole view Example: ... myListViewItem.ImageIndex=-1; myListViewImageList.Images[0]=new Bitmap("somepic.bmp"); myListViewItem.ImageIndex=0; //now do update the item ... The effect I would like to achieve would be the only redrawing of the updated item. You can simulate that by clicking on the updated item. Tthis causes to redraw only the selected item. Greetings, Sven. Instruct the ListView to invalidate just the area contained by your item. listView1.Invalidate(myListViewItem.Bounds); To force the update to t ...Show All
Visual Studio How to support template export in VS 2005?
Hi, There is not the topic of the template export implementation In VSIP document . Could anyone do me a favor Thanks! You cannot disable the command. One note: we have tried export template with other languages, and it will work, but there are very stringent requirements. For example, you must implement VSLangProj on your project, including all the properties that VB, C#, and J# do. But this is unsupported, so there may be some bugs when working with other language types. Craig ...Show All
Visual C# C# Tutorials and books
Hi, As I am confused by searching the net for books and tutorials about C# I ask it here Can somebody give me advice about the following subjects. C# Database Programming C# GDI+ Programming C# Custom Controls C# Generel books are also welcome Greetz I have had the best luck with the C# books from wrox. www.wrox.com They really have some good material and I have learned quite a bit from their books. They are very easy to follow and understand and contain a lot of useful information. ...Show All
Windows Forms WYSIWYG HTML Editor Control
There are tons of browserbased WYSIWYG HTML Editor controls. But, i'm building a windows based Content Managment System, and need a HTML Editor for Windows. Anyone know of a control i could use, or a way to export to HTML Is there classess to convert RitchText to HTML hi, thanks to jonas, i've been able to do a full english& ...Show All
Visual C# How good is the garbage collector?
Just how good is it Is it a C# feature or .NET Framework feature Thanks Quite a bit of the .NET Framework simply wraps around existing Win32 or COM(+) functionality. WinForms is an excellent example, where you still have a HWND backing every window and control. GDI+ is another good example. Take a look at GdiPlus.dll, the Win32 DLL that implements the actual GDI+ functionality. (You can find P/Invoke signature for GdiPlus.dll at http://www.pinvoke.net/default.aspx/gdiplus.GdipAddPathArc and related subsections.) You'll quickly see that System.Drawing is a thin wrapper around it. (GDI+ - and ...Show All
Visual Studio New Item wizards in VS 2005
Hi, I am trying to write a wizard to add new item to VS 2005. I followed the instructions in the Walkthrough: Creating a Wizard in Dev Tools & Languages > VS > IDE > Customizing and Automating the Development Environment > Automation and Extensibility for Visual Studio > Creating Add-ins and Wizards, but I keep getting an error "Invalid at the Top Level of the Document" whenever choosing the new item I just added. Are the instructions missing something Does it refer to an older version of VS How can I create a wizard to add new item to a project Thanks. The XML is pr ...Show All
Software Development for Windows Vista SQL Server 2005 and WF
Hi. Is it possible to use WF in a managed function/stored procedure in SQL Server 2005 If one have a state machine for order it would be nice to use the same state machine in the webshops and in the stored procedures. Interesting question, never tried that... as you can use C# in the stored procedures now, it should not be a problem to write one that starts a WorklfowRuntime and executes a workflow. The only problem I would see is, that there is only one WorkflowRuntime allowed per application domain and I guess that all stored procedures will be executed in the same one. ...Show All
Visual C# File.encrypt method
I'm just trying to do a simple encrypt of a file. I'm getting a System.IO.IOException thrown when the method executes. Am I mis-interpreting this method The documentation states that it's available in C#. Here's a snippet of the important parts. using System; using System.IO; using System.Security.AccessControl; try { File .Encrypt( "G:\\test.tx1" ); //this is an NTFS partition } catch ( IOException er) { MessageBox .Show(er.ToString(), "error" , MessageBoxButtons .OK); } The error is System.IO.IOException: The request is not supported. Then points back to the line containing the ...Show All
.NET Development Using .config file with Assembly.LoadFile or Assembly.LoadFrom
Hi I am loading one assembly at run-time using Assembly.LoadFile or Assembly.LoadFrom. The assembly is a windows executable and also it has a [Name].exe.config file. The [Name].exe.config includes sections of <dependentAssembly> where one of them is shown below. < xml version = " 1.0 " encoding = " utf-8 " > < configuration > < runtime > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> < dependentAssembly > < assemblyIdentity name = "name " publicKeyToken = " d11ef57bba4acf91 " /> < codeBase href = ...Show All
Visual C++ importing VB.net dll (controls) into C++ .net
I had to create custom controls in vb.net for moving in databases in C++.net now my only problem is how do i import that dll or add it to the C++ .net project so that i can use it in any of the forms i'm using. If i dont use the #using and AI/ i get undefined Identifer and all that other stuff that comes along with it. by the way i dont know if i said im using the VS .net 2005 Beta 2 ...Show All
