Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
all groups > visual c > may 2005

Filter by week: 1 2 3 4 5

ActiveX and Late binding in C++/CLI
Posted by none at 5/31/2005 8:39:13 PM
Hello All My app requires runtime creation of an ActiveX control on demand. I attempted to fullfil this requirment with the following code snippet: .. .. .. System::Type ^t = System::Type::GetTypeFromProgID("CONTINUUMX.TRecordSetCtrl.1"); AxCONTINUUMXLib::AxTRecordSet ^rs = (AxCONT...more >>


creating a single instance application
Posted by VooDoo at 5/30/2005 9:41:02 PM
hi, is there a way to ensure an application will run a single instance (for example, like word that opens each document in a different word programm) via mfc features or do i have to code it myself. i did that once by having my application reserve a socket, but this is very not elegant. i dont...more >>

want algorithm details
Posted by ahmad at 5/30/2005 1:09:03 AM
hi, how can i take squre root of a number which is 300+ digits long in VC++. is there any .net class that provide this functionality. I know that in C i have to implement my own data structure( link list ) but have anybody exact idea how can i achieve this -- May you live all the days of yo...more >>

My first C++ Form
Posted by Howard Kaikow at 5/30/2005 12:00:00 AM
I'm trying to use a Form in C++ for the first time. Alas, my only C++ .NET book is for 2002, so it does not cover Forms. In the snippet below, where lstOutput is a Listbox control, I get the error: i:\C++\C++Code\UseForm\Form1.h(121): error C2664: 'System::Windows::Forms::ListBox::ObjectCol...more >>

Can I use what kind of toos for viewing the class of a COM DLL?
Posted by joye at 5/30/2005 12:00:00 AM
Hello , Can I use what kind of toos for viewing the class of a COM DLL? Regards, Joye ...more >>

Event related to a runtime created component.
Posted by Marcelo at 5/29/2005 11:30:28 PM
Hello! I am developping a Visual C++ .NET 2003 multiple forms application. My problem is: When running my application, I click a button and a new main menu item is created. Ok. Now I want to relate an event to the click of this new item created. How do I create an event related to a component ...more >>

Constifier
Posted by Bonj at 5/29/2005 6:06:12 PM
Modifies code files in a C++ project to make as many class member methods 'const' as possible. It parses the methods in all the files, tries making them 'const', tests whether the build succeeds and if not reverts to the previous state. The more methods that are const, the faster the C++ prog...more >>

MC++ basic
Posted by hangaround at 5/28/2005 9:29:41 AM
What does these codes mean as following? #pragma push_macro("new") #undef new...more >>



Passing information between Visual C++ .net & Visual FoxPro
Posted by Rachel at 5/28/2005 1:33:05 AM
I am developing an application on Visual Foxpro 7. I would like to inculde some .NET functions in it. For this purpose I have created a dll in VC++ .net using managed c++. I have written all the code in the .h file. What should I write in the .cpp file to enable me to use the file like the...more >>

Progress Control addition to a Dialog Box
Posted by Ziggy at 5/27/2005 10:07:20 AM
Please excuse this elementary question...but I am just dumb.... I have taken a simplistic Dialog Box and added a Progress Control. When I did that, my Dialog Box was no longer able to intialize using the DialogBox macro. If I remove the Progress Control from the form, the form displays ap...more >>

Default GetOpenFileName to "My Computer"
Posted by mnlarsen at 5/27/2005 9:45:25 AM
How do I set the default location to "My Computer" when using the GetOpenFileName call? I have tried the following but CSIDL_DRIVES doesn't appear to work. Any ideas? WCHAR szFile[260] = _T("text.txt"); WCHAR szPath[MAX_PATH] = _T(""); LPITEMIDLIST pidl; HRESULT hr = SHGetSpec...more >>

C++ assertion
Posted by Penny Balkwill via .NET 247 at 5/27/2005 4:24:32 AM
(Type your message here) I am supporting a system which uses ORACLE Forms, and we are getting an intermittent error: Assertion failed! Program: D:\Dev6i\bin\ifrun60.exe File: D:\f994w32\src\it\ittl.c Line: 482 Expression: !((ptimer->pflags_ittlt)&(((ittlpflg)4)))&&(current || !((ptimer->pf...more >>

Equivalent of "unsafe" in VC++.NET
Posted by tlemcenvisit at 5/27/2005 2:29:01 AM
Hello I'm looking for the VC++.NET equivalent of "unsafe" instruction. unsafe is a VC#.NET instruction Thanks...more >>

Managed Wrapper with abstract classes
Posted by WithPit at 5/27/2005 12:27:01 AM
I am trying to create an managed wrapper but have some problems with it by using abstract classes. In my unmanaged library code i had the following three classes with the following hierarchy Referenced (class) Object (abstract class, inheriting from referenced) Node (class, inheriting f...more >>

How to watch export function and class from a managed DLL?
Posted by joye at 5/27/2005 12:00:00 AM
Hello, I can use the tool such as dllexp.exe to watch the export functions which built by unmanagedC++, but I can not watch the export function or class built by managedC++ . Who know where has the tool that can watch this? Thanks. Regards, Tsung-Yu ...more >>

Hiding unmanaged classes in dual-mode component
Posted by Phil Atkin at 5/27/2005 12:00:00 AM
Hi, I'm currently wrapping my "legacy" COM component with a managed layer, to create a dual-mode component. The structure is very like the JrnlPost sample and the "Exploring COM Interoperability with ATL and Managed Extensions for C++" walkthrough. When I add a reference to my dual-mode co...more >>

How to access a function in a User Control
Posted by Hussain Shabbir at 5/27/2005 12:00:00 AM
Hi All, I have created a MFC ActiveX OCX, using VC++ 7.0, which contains a dialog. I have embeded another user created control (this was created with VB6). This VB6 control exposes 2 functions. I would like some help on how to call these functions from my MFC OCX (say on a button click event)....more >>

C++ to managed C++ wrapper wizard?
Posted by Bae,Hyun-jik at 5/27/2005 12:00:00 AM
Is there any program which analyzes C++ source files and generates Managed C++ files which wraps the original C++ source files? For example, generating a __gc class for each C++ class? Please reply. Thanks in advance. Regards, Hyun-jik Bae ...more >>

managed vs unmanaged c++ application
Posted by Tejas Nandarshi via .NET 247 at 5/26/2005 9:17:40 PM
(Type your message here) -------------------------------- From: Tejas Nandarshi please tell me the difference between managed and unmanaged code in vc++.net application. ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>g4p55iubVE+MfO9zycbhuQ==</Id>...more >>

Create an instance of a form
Posted by tlemcenvisit at 5/26/2005 4:59:23 PM
Hello I'd like to create and affich an instance of the form "Form2" as a mdichild of the actual form. In C#.net, I know that is like this : Form2 MyForm=new Form2(); MyForm.MdiParent=this; MyForm.Show(); But I'd like to do it in C++.NET I think that the first line is : Form2 ^ M...more >>

Do you know LayerD technology? It'll be better than .NET?
Posted by afer at 5/26/2005 2:55:10 PM
I've read about a new free technology named "LayerD", and it's impresive compared to .NET or Java, it's not only really multiplatform, with this technology you can make programs in an object oriented paradigm and the Aspect Oriented Paradigm (AOP), what is more you can make your own Semantics ...more >>

problem of pictureBox1->Image->FromFile
Posted by tlemcenvisit at 5/26/2005 1:21:03 PM
Hello This code don't affich the image pictureBox1->Image->FromFile("c:\\image.jpg"); c:\image.jpg exists. Please, can you help me? Thanks...more >>

an OpenFileDialog problem
Posted by tlemcenvisit at 5/26/2005 12:17:28 PM
Hello I am trying to open a text file, I use this code : private: void button1_Click(System::Object^ sender, System::EventArgs^ e) { Stream^ myStream; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog; openFileDialog1->InitialDirectory = "c:\\"; openFileDialog1->Filter = "txt fi...more >>

Split spin in two buttons
Posted by Ghost at 5/26/2005 12:08:06 PM
Hi all I hope in an answer that could help me about my problem. I'm creating a GUI in Visual C++ .NET and I'd like to split the "Spin Control" in two buttons, has someone some ideas to do this? The normal spin control ------ | up | ------- ...more >>

How to avoid manual copying?
Posted by Steve at 5/26/2005 11:16:03 AM
I have an assembly ComnAssembly.dll which is used by 3 applications. In other words there are 3 solutions which include ComnAssembly.dll project. In order to avoid manual copying I use post-build event command line inComnAssembly.dll project. The problem is that I can copy ComnAssembly.dll ...more >>

Read file >2GB
Posted by Saran at 5/26/2005 11:07:08 AM
Hi, I'm trying to use _fseeki64 to read large files but getting linker error (undefined) though I link with msvcrt.lib. Can any one suggest a way to fix this problem or suggesting different function? Thanks Saran Note: I can not link with libc.lib...more >>

fatal error C1506: unrecoverable block scoping error
Posted by Stormy at 5/26/2005 8:33:35 AM
when I compile my program I get "fatal error C1506: unrecoverable block scoping error". Can anyone tell me why? Thank you very much in advance. namespace unManaged { template<class L> class Mytemplate : public myUnManagedClassA { }; __nogc class A : public OD_myUnManagedClassB { }; __...more >>

ASP/ActiveX Error
Posted by John Gabriel at 5/26/2005 6:43:05 AM
I have set up a website and am testing ASPs. I have created a very simple ActiveX component with two interfaces: AboutBox() - displays About details calcpi() - returns 3.14159 Here is my configuration (All the most up to date versions except for Visual C++): Windows XP (...more >>

highlight a row in list box
Posted by wayne at 5/26/2005 4:05:22 AM
hi may i know how can i hightlight a row in a list box using VC++?? thanks alot wayne -- wayne ------------------------------------------------------------------------ Posted via http://www.codecomments.com -----------------------------------------------------------------------...more >>

Streams and commas
Posted by John at 5/26/2005 12:00:00 AM
Hello, Why does the following code print "fail" instead of "123" in the vc 2005 beta? Thanks -John #include "stdafx.h" #include <sstream> int _tmain(int argc, _TCHAR* argv[]) { std::stringstream ss("123,456"); int x; ss >> x; if (ss.fail()) { printf("fail"); } ...more >>

implicit/explicit __gc/__nogc confusion wrapping a windows api
Posted by Achim Domma (Procoders) at 5/26/2005 12:00:00 AM
Hi, I still try to implement a .Net wrapper to handel AVI Files. I'm unsing managed C++ with VStudio 2003. The structure of my classes looks like this: class AudioStream { ... } class VideoStream { ... } class AviFile { IAVIFile* file_; AudioStream* audio...more >>

msi.lib missing from vc 2005 beta?
Posted by John at 5/26/2005 12:00:00 AM
Hello, I am finding that the file: Microsoft Visual Studio 8\VC\PlatformSDK\Lib\msi.lib does not exist even though: Microsoft Visual Studio 8\VC\PlatformSDK\Lib\AMD64\msi.lib Microsoft Visual Studio 8\VC\PlatformSDK\Lib\IA64\msi.lib Do. Was this intentional? Thanks -John...more >>

Terminate an application
Posted by Claude Gagnon at 5/25/2005 8:00:34 PM
Hi, I program with Visual C++ .NET 2003. I have an application that I want to quit if a specific date is passed. (the user will not choose Quit in the menu) I want to terminate the application in the OnClose member function of my ...more >>

Object reference not set to an instance of an object error
Posted by xactdata at 5/25/2005 1:13:12 PM
I have a program that uses the OleDbConnection class using C++.NET. I have all of the appropriate includes, namespaces, references, etc. and declare the class: class OleDBClass { public: gcroot<OleDbConnection*> oleConn; OleDBClass( ) {} }; inside my application class. It builds ju...more >>

Fail to PrintContext without CDialog.DoModal call previously
Posted by Jürg Fross at 5/25/2005 1:07:23 PM
Hi all, I have to recompile a MFC++ Program developped under NT4.0 in XP. We store the printer settings (DEVMODE and DEVNAMES) as part of our document. When printing in batch mode, we need to create a PrintingContext without asking the user. Here is my code fragment (I removed all error hand...more >>

Pinning Vectors
Posted by Brian Victor at 5/25/2005 12:34:47 PM
I have a situation where I have a vector<gcroot<ManagedWrapperClass*> > whose contents I need to pass to an unmanaged function. Is there a way to pin all the pointers in the vector for that function? I tried to copy the vector into another vector with a pinned pointer type, but the compiler wi...more >>

How to find out if a user has logged on ?
Posted by Polaris at 5/25/2005 12:32:13 PM
Hi: Within a Windows Service, is there a way to find out if a user (any user) has already logged on to the machine ? Thanks In Advance ! Polaris ...more >>

Debugging .lib files
Posted by Brian Victor at 5/25/2005 10:11:29 AM
In further work on my "baffling unresolved token error" from yesterday, I have moved to an approach of placing more code in the native .lib file which is then called from the managed wrapper. Unfortunately, I seem to be unable to debug the native .lib. It is in the same solution as my managed...more >>

Weird conversion warning
Posted by Josué Andrade Gomes at 5/25/2005 7:37:04 AM
Take this code: 1: int main() 2: { 3: unsigned short x[5] = { 1, 2, 3, 4, 5 }; 4: unsigned short sum = 0; 5: 6: for (int i = 0; i < 5; ++i) { 7: sum += x[i]; 8: } 9: } CL version 13.10.3077 gives the following warning: err.cpp(7) : warning C4244: '+=' : convers...more >>

graph plotting
Posted by wayne at 5/25/2005 12:36:35 AM
hi, any1 know how to plot graph using vc++?? thanks wayne -- wayne ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------ ...more >>

C++/CLI vs MCPP
Posted by Boni at 5/25/2005 12:00:00 AM
Dear All, we have a big project with C# and MCPP mixed assemblies. Is MCPP still supported in VS2005? Do we have to change something in MCPP? With best regards, Boni ...more >>

Networking question
Posted by Ioannis Vranos at 5/25/2005 12:00:00 AM
When we have a TcpClient or TcpServer or UdpClient, receiving data and then processing them inside an infinite loop, inside a method executed by a Thread, I assume that the data being received while the previous data are processed inside the loop, are queued or something and are not dropped ri...more >>

Does P/Invoke work against C++ classes?
Posted by Tommy Svensson (InfoGrafix) at 5/25/2005 12:00:00 AM
Hi, Can I use P/Invoke to obtain a C++ class type contained in a dll? I know how to get structs and how to pass classes as parameters to native code but how do I get C++ unmanaged classes from a native dll using P/Invoke? Thx! /Tommy ...more >>

assignment operator syntax
Posted by Rob at 5/24/2005 9:23:15 AM
To follow up on the "copy constructor clarification thread"... The assignment operator syntax shown previously: MyClass% operator=(const MyClass%); seems to have problems if you have member properties that need to be copied from the rhs to the lhs. Since the rhs parameter is "const MyClas...more >>

Baffling unresolved token error
Posted by Brian Victor at 5/24/2005 7:37:44 AM
I'm trying to get FFTW (fftw.org) to work in such a way that it can be called from a managed C++ module. The approach I've found to generate the fewest linker errors is a mixed managed/unmanaged project. However, that still produces the following from the linker: FFTW2 error LNK2020: unresolv...more >>

Static String Array Initialization in MC++
Posted by rmathieu NO[at]SPAM cae.com at 5/24/2005 7:36:04 AM
Hi, I want to initialize a static String array in MC++. What I want to do is to initialize my String array like the C# way: new String[] {"11", "22"} but I could not find an equivalent in MC++. The onlu thing I can do is this: new String*[2] but I cannot specified any initial values... Did some...more >>

get the assembly version
Posted by Thomas Wegener at 5/24/2005 12:00:00 AM
I'm new in the .net environment. How can I get the current version, from my own created assembly, [assembly: AssemblyVersion("6.60.0.10")] ? Thanks Thomas ...more >>

webservice native allocation problem
Posted by Jun at 5/24/2005 12:00:00 AM
i create a webservice and added my old .h and .cpp files. it compiles fine but gives me a runtime error... System.NullReferenceException: Object reference not set to an instance of an object. at new(UInt32 ) etc.... pointed at this line unsigned char* ucMessageUTF8 = new unsigned cha...more >>

how to map a message in visual Studio .net ?
Posted by Polaris at 5/23/2005 12:49:46 PM
Hi: In VisualStudio 6, there is a place allows developer to implement mapping of windows message and its handler easily under View -> ClassWizard. For example, I can map WM_TIMER to my own handler function using this feature. Just wonder, is there similar feature in .net ? I could not find...more >>

change login user for source control
Posted by MechSoft at 5/23/2005 12:42:09 PM
Hi, I've got this problem with source control when multiple users use the same computer. Somehow the project I work on has someone else's login to sourcesafe, which creates this subtle problem to me: whenever I edit the file, and thus the file is checked out, but checked out by someone else...more >>


DevelopmentNow Blog