Software Development Network Logo
  • Visual C#
  • Visual Studio
  • Audio and Video
  • Windows Forms
  • VS Team System
  • SharePoint Products
  • Windows Vista
  • Game Technologies
  • Smart Devicet
  • .NET Development
  • Visual FoxPro
  • Microsoft ISV
  • IE Development
  • SQL Server
  • Visual C++

Software Development Network >> Visual C++

Visual C++

New Question

dialog / menu stop working in MFC application
Visual Studio 2005 on Windows 2000 - 64 bit applications
VC++ won't run from source control: "The system cannot execute the specified program"
C++/.net interface
Can't #Include <complex.h> to my Win32 Console application
indexed property definition in .cpp
Memory bloat when using Visual Studio
How to change data type from unsigned short to LPWSTR?
runtime error when printing
How to use a dll?

Top Answerers

holysmokes99
Soteriologist
kaynos
Spyder_Snyper
Tim Dallmann
jackiep
Robert Jeppesen
Thena
Thomas2054
Autofreak
Utilizing ASP to Provide Database Access Through Web Browsers
Only Title

Answer Questions

  • Katie446 Templates in forms

    Hello. I have visual studio 2005 c++.   I have created a CLR Windows Forms Application. It has come up with Form1.h and Form1.h (design view).   I am trying very hard to create template. I have gone through the forums on this site and the official help menu, amongst other things and tried the following delerations, but on compiling none of them work. Pretty pretty please could someone help me creat a template that can 1) store a value of variable type .... 2) carry out a function called readDataFromBuffer             private :                   template < t ...Show All

  • vgrigor getting program filepath

    how can i make my program get its own filepath-i have tried GetModuleFileName but all that gives me is "C" when the real directory is something like C:\my documents\visual studio 2005...... is there any other way to do this i didnt keep my old code but i got it working with getcommandline() that is possible that i used it incorrectly but this is much simpler and works great thanks a lot Please show your code and how you look at the string. It pretty much looks like you are compiling with unicode character set which uses 16 bit characters. So for standard letters you will get the 8 bit ASCII code followed by a 0 byte. So "looking" at the data with a char* gives you the wrong string. The easie ...Show All

  • Jaze LNK2001: using unmanangedC++ in manC++

    Hi, i'm writing a new user-interface for a small software-company. The old interface should be replaced by the new one, the "inner core" should stay. The old program was written in unmanaged C++, but now I'm writing the user-interface in C#, so I have to use class wrappers. While building the managed C++-project (in a solution with the unman. C++-projects) there a some errors. For example: Error error LNK2001: unresolved external symbol ___argv nafxcwd.lib and Error error LNK2001: unresolved external symbol ___argc nafxcwd.lib Another one: Error error LNK2001: unresolved external symbol __pgmptr db.lib [db is one of the old unmanaged C++-projects] The settings are the following: Linker->Input->Add. Dep ...Show All

  • Robert Palmer regarding VC++ Fatal error c1083

    hi im porting a vc++ application into Managed VC++. so im making a win 32 dll file .In that im adding some .H files and including in my class then im getting fatal error c1083 cannot open include file. actually im including the files given by eicon corporation(x25proto.h). How to solve this,im not able to proceed further. given below is my code // IPOVCDLL.cpp : Defines the entry point for the DLL application. // // "/#if !defined(X25PROTO_H__774091B5_DDEF_11D7_BF51_008048B539D8__INCLUDED_) #define X25PROTO_H__774091B5_DDEF_11D7_BF51_008048B539D8__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000\" #include "stdafx.h" #include &l ...Show All

  • Adam Machanic Bug in Visual Studio 2005 Professional edition ?

    I've created a simple Win32 console application. When I try to run it by Ctrl + F5 it, I get the message: "This application has failed to start because MSVCP80D .dll was not found. Re-installing the application may fix the problem.". Kindly note that i am not trying to run and install my application on different machine.Also note that i've already installed SP1 of 2005 pro edition but still the problem persists. Many a times the problem is solved by the usual methods like: 1) Goto Project Properties -> Linker -> Debugging -> Generate Debug Info (change it to No) 2) Link statically to the C++ runtime library using the /MT switch. Well there is also an alternative about Goto Project properties- ...Show All

  • USMCNJ Using CLR

    Standalone using CLR Is it possible, if not, what are the advantages of using CLR Thanks, Chris The Platform SDK gives you the header files and library files to create native apps in VC++. You'll need to be familiar with the Windows API as well as non-CLI C++ in order to make use of it. So what do professional coders do to make their programs standalone Yes: the is a separate .NET only install. If don't use the CLR then there is no need to install it. But if you application depends on the C and/or C++ runtime (which almost all C and C++ applications will) then you will need to ensure that the appropriate is installed on the target machine. T ...Show All

  • igor1960 Question about const_cast

    Here's round two of my silly questions. How come this compiles: ---------------------------------- int main (int argc, char * argv[]) { const int test1 = 5; const int test2 = const_cast<const int &> (test1); return 0; } ---------------------------------- But this does not. ---------------------------------- int main (int argc, char * argv[]) { const int test1 = 5; const int test2 = const_cast<const int> (test1); return 0; } ---------------------------------- Error 1 error C2440: 'const_cast' : cannot convert from 'const int' to 'int' j:\test\main.cpp 4 ---------------------------------- I definitely have the latest version of VC++ Express Edition this time. Oh.  In the d ...Show All

  • shade29450 C++ Generics issue

    Hi. I'm having a problem converting some C# to C++/CLI, which involves generics: //// C# code (compiles and runs): ///////////////////////// // The constraint requires the generic parameter T // to be convertable to the type of the derived class: public abstract class MyBaseT<T> where T : MyBaseT<T> { public MyBaseT() { } } public class MyDerived : MyBaseT<MyDerived> { } //// (equivalent ) C++/CLI code: //////////////////// generic<typename T> where T : MyBaseT<T> public ref class MyBaseT abstract { public: MyBaseT() { } }; public ref class MyDerived : MyBaseT<MyDerived> { }; /// Compiler error: Error 1 error C3393: syntax error in constraint cla ...Show All

  • sedso C++/CLI - Type conversion

    Hi, I'm working on a project in C++/CLI that uses some .NET classes so I need to use "ref class" instead of native "class", but I have the following problem: // If using native classes, I can write the following: class A { A(int n) { .. } }; void foo(A a) { ... } foo(10) // Automatically converts int to A But when I use "ref class" instead of "class" in this code (when declaring A) it won't compile - I think it is because the automatic conversion of int to A isn't allowed in C++/CLI. Is something similar to this automatic conversion from C++ possible for "ref classes" As a workaround I could define overload of the "foo" function for every type that can be converted to ...Show All

  • Anand Raman - MSFT Visual C++ Runtime Library Error

    I am continually getting this message on my Dell Dimension 9200 (brand new) with Windows XP Pro: Visual C++ Runtime Library Error Program C:\Program Files\InternetExplorer\ieexplore.exe This is extremely disruptive. There were a couple of answers posted ...after install of Office XP or and XP program but the solution didn't work or wasn't specific enough. I'm not a developer, just a technical information worker type (even worked at MS for 8 years!). Thanks Jeanne The forumsare for dev issues. For other issues, please use the newsgroups at http://msdn.microsoft.com/newsgroups OTP Thanks, Ayman Shoukry VC++ Team ...Show All

  • dvidal How can i use COM Object in Vc++ or Vc++.NET?

    Hi All, I am having COM object that is "comgs.dll",which is the open source library,got from "http://community.wow.net/grt/comgs.html".so,there is no " .LIB " file and " .h " file, only that website contain "comgs.dll" file. How can i avail in my new Vc++ project or Vc++.NET project.If you know please send any articles or sample codes.... Thanks....... It depends on whether you are using ATL and/or MFC or neither. I will assume you will use neither; you will be interfacing with the object directly. There are multiple ways to do this, but among the most common is to use #import to import the type library. Look for #import in the documentation. Wh ...Show All

  • Biju S Melayil File Print Preview not working in existing code while compling from Visual studio 2005

    I have some code which does some printing.It seems to work when you compile and run in visual studio 6 .While compiling and running in VS 2005 and clicking on the File print preview menu displays nothing.It just displays the original main frame window. In the Main app file the initinstance method is displayed as CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME, RUNTIME_CLASS(CDpqwinDoc), RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CDpqwinView)); AddDocTemplate(pDocTemplate); ...... but FOR printing purposes i use a seperate class Printview which calls the default CView::OnFilePrintPreview. Just before that i do the following void CPrintManager::CreateView() { //create a ne ...Show All

  • Kristof.Taveirne how to pin an array

    I write in managed c++ with VS2005. I would like to pass the contents of a CLR array to the WIN32 function "WriteFile" by pinning rather than by copying. I think that platform invoke does help to this problem. However, I only know the syntax of platform invoke with VB.NET and C#. How can I write codes of platform invoke in managed c++ Or could you suggest some alternate solution to my problems Thank you for kind attention. -Jeremy You can use a technique called IJW. Effectively, you do the call in standard native C++ code and the compiler handles interop behind the scenes. If any of its embedded subobjects is pinned to whole object is pinned. You just need to have a pin_ptr<> point t ...Show All

  • RobZeilinga nafxcwd.lib library linker error LNK2019 - help

    Hello experts, Below is the small program I am having issues with. It compiles successfully. As you see is quite small and simple program, but for some reason I am unable to link it when I tried to build it. I have also pasted the last part of the output from the linker with verbose. Hopping someone can help me out. It seems a problem with nafxcwd.lib but I am unsure. /* Setup includes */ #include <stdafx.h> #include <afxwin.h> /* Addinitional includes */ #include "ifl.h" /* Main */ int main(int argc, char** argv) { // Variables Declaration IFL_RC iRetCode = IFL_SUCCESS; HWND m_hwndMain; // Get Handle to the main window m_hwndMain = AfxGetMainWnd()->m_hWnd; // Initialize the use ...Show All

  • sjb500 Different manifests for /subsystem:console and /subsystem:windows

    Hi, I have the following problem: I have an application A that was developed with VS 2003, where it ran without any problems, both in Debug as well as in Release mode. Recently, I upgraded to VS 2005, now everything still compiles and huilds ok, but in Debug mode I get the error message, that MSVCR80.DLL can not be found. Depends.exe shows that this dll is needed by another dll that my program uses. However, in some other apps, B, that I wrote and that need the same dll, the problem doesn't occur, neither in Debug nor in Release mode. The difference between A and B is, that A is a console app (/SUBSYSTEM:CONSOLE) and B are windows-apps (/SUBSYSTEM:WINDOWS). Further investigation showed that in case A there is no reference to the CRT in the ...Show All

484950515253545556575859606162636465

©2008 Software Development Network

powered by phorum