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 > april 2004

Filter by week: 1 2 3 4 5

optimize Pentium 4 and above bug!?
Posted by Ludde at 4/30/2004 11:11:03 PM
I beleave I have found a bug in the C++ compiler of Visual Studio 200 The correct output for the code below is "Color is: 99b2cce5" but if I turn on the Pentium 4 and above (/G7) options I get the follow result "Color is: 80000000" which is completly wrong I found this bug when upgrading from v...more >>

IContextMenu interface problem
Posted by Rajko at 4/30/2004 9:11:33 PM
HRESULT QueryContextMenu( HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags ); function gives me to small range of numbers !!! usually: idCmdFirst = 31209 idCmdLast = 31226 and I need at least 10 more (I have submenu(popmenu) ...). Thx, R...more >>

VC7.1: Parser bug with overloaded function templates
Posted by Hendrik Schober at 4/30/2004 8:30:50 PM
Hi, VC7.1 compiles the following, however, CW9, GCC 3.4.0, and Comeau reject it: #include <iostream> #include <typeinfo> class Test1 {}; class Test2 {}; class Test3 {}; template< typename T > struct Cont { T t; }; template< typename T > class ...more >>

out/ref params
Posted by Simon Cheng at 4/30/2004 6:40:27 PM
Hi, Does MC++ support out/ref param semantics (as C# does)? The MC++ spec doesn't mention about this, so supposedly they are not supported? Thanks, Simon ...more >>

Argument to __identifier keyword
Posted by Simon Cheng at 4/30/2004 5:33:39 PM
Hi, In MC++ spec 22 __identifier Keyword: The argument to __identifier shall be a C++ keyword. But the following compiles fine: int main() { int __identifier(num) = 123; return __identifier(num); } What am I missing? Thanks, Simon ...more >>

Adding a control to ControlCollection.
Posted by mccoyn at 4/30/2004 1:16:03 PM
I am having trouble adding a control to ControlCollection in a class I have derived from GroupBox. Here is what I've got __gc class RowColumn : public System::Windows::Forms::GroupBo public RowColumn() ignoredcontrols = new System::Windows::Forms::Control::ControlCollection(this) vo...more >>

Questions on __value class
Posted by Simon Cheng at 4/30/2004 12:12:40 PM
Hi, In C#, value types are derived from System.ValueType (and hence from System.Object). Does this hold true for MC++? __value class ValueClass {...}; Is ValueClass above derived from System::ValueType (and hence from System::Object)? Thanks, Simon ...more >>

"Run-Time Check Failure #2" on Xerces & Xalan (Bug?)
Posted by Francesc Guim Bernat at 4/30/2004 11:11:08 AM
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that th...more >>



/RTC1 and /CLR options are incompatible
Posted by Arun Kannan at 4/30/2004 4:21:02 AM
Hi We are planning to upgrade a MFC Application (.Exe) to compile on Dot Net Framework. I have opened the application in Visual Studio 2003. I changed the compiler option to /clr. I have set following properties -Basic Run Time checks to Default -Smaller Type Check to N -Runtime Library -Mutl...more >>

Handling ENter event on LIst Ctrl
Posted by Niks at 4/29/2004 9:01:04 PM
I have a list control. On doubleclick of list item, a new dlg opens. Now, i want to handle 'OnEnter Key'also. i.e. When a list item is selected & Enter key is pressed, the new dlg shd open I tried implementing with NM_RETURN. But, the application does not catch this msg Also i tried with LVN_KEYD...more >>

How do I access COM objects?
Posted by Dan at 4/29/2004 6:27:42 PM
Sounds simple enough - problem is there seems to be WAY too much documentation and can't seem to find the right one. I created a VC++ .NET Windows Form application, and I'm trying to add TAPI3 to it. I've gotten as far as adding a reference to the TAPI3.dll, which gets me all the type informa...more >>

is it possible to create a custom project template
Posted by Bruno van Dooren at 4/29/2004 3:14:16 PM
Hi, i have worked with visual studio for a long time, and would like to have a project template that represents a custom project that is used a lot. (Visual studio .NET 2003) the goal is that if i select 'Add new project', visual studio generates a custom project with the desired files and ...more >>

Remote debugging settings
Posted by Jan Bares at 4/29/2004 11:52:55 AM
Hi, it is nice that the remote debugging settings is separated from local debugging (I mean Remote command). But, unfortunately still one option is shared - the Working directory. Why? I certainly have different working directory for local and remote debugging. I have VC 7.1. Jan ...more >>

Bug including a static lib in a MC++ application
Posted by Arnaud Debaene at 4/29/2004 8:25:35 AM
Hello, I think I found a bug in VC 7.1 concerning destruction of stack objects when linking a static, non managed, C++ library within a managed C++ application. Here is a repro case : 1) Build a static, unmanaged, library containing the following 2 files. Compiles with /MDd. // FILE BaseHo...more >>

debugging
Posted by rjvink at 4/29/2004 7:36:02 AM
hi I am trying to debug a function thats in a library module. I would like to do this from the calling executable debug session (visual studio). I am running visual C/C++ 6, and the function is in a user created library. I have the source and project for both Thanks rj...more >>

Is there a way to temporarily disable events?
Posted by mccoyn at 4/29/2004 6:06:04 AM
I would like to be able to change a property of a control without calling the event handler I have registered for it. For example, I would like a function like the following void SilentSet(CheckBox* checkbox, bool set) DisableCheckedChangedEvent(checkbox) checkbox->Checked = set EnableCh...more >>

Trying to compile HelloWorld.cpp
Posted by Hayato Iriumi at 4/28/2004 11:02:24 PM
I guess I'm going through initiation while I try to get into C++. I can't even compile a Hello World app. Here is the code... #include <iostream> using namespace std; void main() { cout << "hello"; } When I try to compile the file "HelloWorld.cpp", I get the following error. Hel...more >>

Error LNK2091
Posted by Red at 4/28/2004 9:55:53 PM
I am taking a c++ course. I have a simple program that just wont compile and I cant seem to figure out why. If I compile the class file without referencing it in the int main() it will compile but once I try to createon abject of the class type I get: Recursive error LNK2019: unresolved extern...more >>

C++ compiler for ver 7.1
Posted by Hayato Iriumi at 4/28/2004 8:02:58 PM
I looked into CLR path, but couldn't find a compiler for C++ that comes with VS .NET 2003... I mean, C#, J#, VB .NET and even JScript compilers are in that folder. Why not C++? ...more >>

Same code 4 X slower on VC++ 7.0 than VC++ 6.0
Posted by Corgan at 4/28/2004 6:51:02 PM
I compiled the same code as release version in VC++ 7.0 and it runs about 4X slower. My program is doing a mathematical search where time is important... am I forced to stick with the older version of the compiler?...more >>

Toolbox in VC++.NET
Posted by Maileen at 4/28/2004 6:50:22 PM
Hi, I was wonder how to enable all MFC control available on "Windows Forms" tab for example ? i need to have access to control Panel and is disabled... where could i find help on internet for that ? thanks Maileen ...more >>

GetOpenFileName bug
Posted by Rajko at 4/28/2004 6:06:05 PM
GetOpenFileName with flag OFN_ALLOWMULTISELECT will create error message if number of characters exceeds 29700 characters. I does not matter if you alocated enough space. It will use only first 32768 TCHARs. Error message is file not found, and partial file name is displayed. BTW what is t...more >>

Menu on the right
Posted by Ioannis Vranos at 4/28/2004 5:53:45 PM
Hi, i made an app with only one menuitem (on a mainmenu of course) ahd the problem is that it is placed on the left, but i want to place it on the right (it's a Help menu). Any ideas of how to place it on the right? I am using .NET 1.1. Ioannis Vranos ...more >>

newbie help ?? -> mscorlib.dll
Posted by tw NO[at]SPAM ttybolx.fsnet.co-dot-uk.no-spam.invalid at 4/28/2004 3:36:43 PM
The other day i tried my first bit of c++. I was writing a really small program,something like this: #include "stdafx.h" #using <mscorlib.dll> using namespace System; int _tmain() { Console::WriteLine("Hi"); return 0; } Which i know is simple but i still get this error ....more >>

String Convertion Problems
Posted by lagerg NO[at]SPAM cox.net at 4/28/2004 12:16:38 PM
I am a new to C++. I wrote the following code in my function. BSTR bstr1; System::String * order[,] = new String* [1000,2]; bstr1 = order[row1,1]->ToString(); When I try to build the function I get an Error saying I cannot convert from System::String to BSTR on the 3rd line. Is this pos...more >>

Linking error in VC++ .NET 2003
Posted by sweitzen at 4/27/2004 9:31:05 PM
My copy of VS .NET is Microsoft Development Environment 2003, Version 7.1.3088 Microsoft .NET Framework 1.1, Version 1.1.4322 I have a project (C++ Class Library) I originally wrote in VS .NET 2002. It worked then, and when I convert it to VS .NET 2003 and recompile, it works now. The problem i...more >>

How to find an algorythm code
Posted by Federico Babelis at 4/27/2004 8:39:32 PM
Hi: Any could help my find how to create the code for the following algorythm: In1: 10000000 In2: 00000000000 the algorythm runs and this is the output: 01A6DC6B07262F69 Any help will be appreciaterd ! Regards, Federico ...more >>

Visual Studio 6.0
Posted by Xavier Valdés at 4/27/2004 5:47:42 PM
Hi all, I've made a component (COM) with Visual C++7 (VS.Net version) and I want to use it from Visual Basic 6.0 in another computer. I wanted to know which dll's do I have to distribute with my component to run in the other computer. I do not want to distribute .NET CLR cause it's not a .ne...more >>

Public managed enum types in MCPP - Compiler warning
Posted by Alan Cobb at 4/27/2004 4:08:04 PM
Hi, In the managed C++ class below I get compile warning C4677 from VS2003. "signature of non-private function contains assembly private type", even though the managed enum is public. I have to drop the "enum" keyword from my member variable declaration to keep the compiler happy. Sho...more >>

How can I reference a different .NET dll based on debug/release mode?
Posted by Scott Yost at 4/27/2004 3:38:40 PM
I reference a .NET DLL to import some of my custom types. I can build that DLL in debug or release mode, but I usually keep the debug one built so I can debug it. When I want to link to the release version of the DLL, I find that I have to remove the reference from the project and point VS. NET t...more >>

0x800401F3
Posted by Xavier Valdés at 4/27/2004 3:29:06 PM
Hi all, I'm using VB.Net to access a COM component developped in VC7. The problem is when I add an enum type in COM's public interface I get following error when calling the associated method with VB.NET: System.Runtime.InteropServices.COMException unhandled error What's the problem?!?! It ...more >>

DLL load error.
Posted by agzis NO[at]SPAM yahoo.com at 4/27/2004 12:54:50 PM
I wrote DLL (no MFC at all). Here's some export functions. When I call DLL from test application everything OK. Then I added to DLL class (this class never called just compiled together without any error). Then I started test application and on load received error message "The procedure enntry ...more >>

Incremental linking and multiple projects
Posted by Rudy Ray Moore at 4/27/2004 9:03:06 AM
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library (.lib)". My question: Should the linker incrementally link when I make a change to one of the ....more >>

Best book for C++?
Posted by Hayato Iriumi at 4/26/2004 9:40:15 PM
I'm a software engineer with 6 years of experience. I know what programming is about, but never had a chance to get into C++, and I'm picking it up now. I'm looking for a book for someone who already has programming background. I don't want to have to go through what is a class or Hello World typ...more >>

Visual C++
Posted by adwoa at 4/26/2004 8:16:06 PM
Can anyone help show me how to read records line by line from a text file into structures. I know how to read the whole file but can't do line by line....more >>

Warnings-as-errors, /Wp64
Posted by Bern McCarty at 4/26/2004 3:24:52 PM
We have a large source base that we normally compile with /WX (treat all warnings as errors) and /W3. I would like to add the /Wp64 switch to this mix so that developers see the /Wp64 warnings but I don't want them to be treated as errors. Treating them as errors would be impossible at this ...more >>

cannot include <fstream>
Posted by nils at 4/26/2004 1:44:27 PM
Hi all, Recently I started migrating a gcc project to Visual Studio C++ (dotnet). The problem is that I cannot include any iostream header-file: #include <fstream> int main (int argc, char * argv) { printf("hello world"); return 0; } This will result in the following compilation e...more >>

ISAPI dll and .NET (clr)
Posted by David Sacks via .NET 247 at 4/26/2004 1:41:24 PM
Hi, Was wondering if anyone knows how to get an ISAPI dll to work= with managed =2ENET code? I have an exisiting ISAPI dll and I'd= like to get it working with some =2ENET managed code=2E I've enabled= the /clr option, integrated my managed code into the unmanaged= code and have my dll co...more >>

Bugs & runtime error linking with LIBCMTD.DLL in Managed C++
Posted by wmkew at 4/26/2004 10:26:01 AM
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with LIBCMT(D).DLL. (My requirement is that we can't link with MSVCRT(D).LIB.) Below are steps I've follow...more >>

Hardware Access
Posted by BobWorkman at 4/26/2004 9:41:05 AM
I am using WindowsXP There are a set of commands that can be passed to an ATA drive to preform several Security and SMART functions DeviceIoControl seems similar but does not implement the required command set or give access to the required registers and the _outp() command of course does not wor...more >>

"Missing required export functions" error for my dll
Posted by foneman at 4/26/2004 8:26:03 AM
I wrote and compiled a dll without error. When running the app that calls my dll, I get "Missing required export functions at <filepath to my dll> The dll was created with Visual C++ .Net (Version 7). I left the various files that were automatically created for my project (my_dll.cpp, my_dll.d...more >>

how to write web service program in VC++.NET (2003)
Posted by Larry at 4/25/2004 5:43:34 AM
Hi, I am a VC++ (6.0) programmer. Now, I got a project to use VC++.NET (2003) to write a web services. This should be a client-server program. The server side should be web service with database support (SQL Server or Access DB). the client should be a GUI program (managed C++)...more >>

Getting compiler error C2653 and don't know why.
Posted by Richard at 4/24/2004 5:45:03 PM
Hi All, I am using Visual C++ .Net to create a windows forms application and I am getting the following errors when I do a MessageBox::Show in my Form1.cpp file: Form1.cpp(19): error C2653: 'MessageBoxA' : is not a class or namespace name Form1.cpp(19): error C2660: 'System::Windows::Forms:...more >>

removing spaces in a string
Posted by lino_iozzo NO[at]SPAM sbcglobal-dot-net.no-spam.invalid at 4/24/2004 2:35:42 PM
Hello, I have the following string: const char plaintext[] = "Fourscore and seven years ago our \ fathers brought forth upon this continent \ a new nation, conceived in liberty, and dedicated \ to the proposition that all men are created equal."; when i step thr...more >>

Newbie::Simple method to clear screen in VC++ .net (unmanaged) console project
Posted by mel smith at 4/23/2004 6:27:39 PM
I writing a simple console program but my input output on the screen is getting cluttered is there a simple method of clearing the screen, a MS function perhaps. Cheers nifsmith ...more >>

Problem with calling unmanaged function from VC++
Posted by alex NO[at]SPAM darkhonor-dot-com.no-spam.invalid at 4/23/2004 5:38:06 PM
I'm very new to Windows development, all of my background is in Linux, so please bear with me. I am working on a class project and just for fun I'm building a frontend using VC++ 2003. The project uses the OpenSSL crypto libraries (specifically the BIGNUM functions). The offending code is: ...more >>

PRJ0019
Posted by Xavier Valdés at 4/23/2004 1:05:59 PM
How can I solve Registering Component PRJ0019 error when compiling an ATL DLL in VisualC7? Thanks a lot, Xavi ...more >>

mailto usage
Posted by nada at 4/23/2004 12:11:03 AM
Hello, i trying to call mailto: command from my vc++ code .I tried to use CreateProcess(...) but all i mannaged to do is to open the outlook express window How can i open the new message window with a specific email address???? Thanks in advance nada shalab ...more >>

fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701)
Posted by Marco Nova at 4/22/2004 11:51:05 PM
Hello I'm using the latest version of Visual Studio 2003 version 7.1.3088, .net framework 1.1.4322 and I've some problem compiling a project, it give me the error c:\build\main\.....\methodeInc.h(36) : fatal error C1001: INTERNAL COMPILER ERRO (compiler file 'msc1.cpp', line 2701) ...more >>

Strange results in bitwise operations
Posted by Fabrício de Novaes Kucinskis at 4/22/2004 9:33:59 PM
Hi all, I'm doing some bitwise operations in VB.NET, and I got some strange results. If an Int16 (Short) variable has the value &HAA (8 bits) and I do a 4-bit shift: var16 = var16 << 4 I got, correctly, the value &HAA0. But, if I try to do a 8-bit shift, I got &HFFFFAA00 !!!! I did ma...more >>


DevelopmentNow Blog