Groups | Blog | Home


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 > november 2005 > threads for november 8 - 14, 2005

Filter by week: 1 2 3 4 5

Newb has output formatting question
Posted by menotu3169 at 11/14/2005 8:30:35 PM
Alright, I'm just learning C++ and I'm trying to make a program. It uses a 10*10 array, calculates what all the values are and then outputs the values stored in the array on the screen. My teacher's out sick, and no one in my class has been able to help me. What I want to do, is take an...more >>


try-catch won't catch in the Release mode
Posted by lauch2 at 11/14/2005 5:38:03 PM
In a default MFC - dialog based application (VC6.0 or VC7.1), the following try-catch code does not be catched in Release mode, but it is OK for Debug mode. Any compiler/link option is required to turn on or turn off? try { int *i = 0; *i = 0; } catch(...) { MessageBox("Catched")...more >>

managed (/clr) destructors
Posted by Peter Oliphant at 11/14/2005 2:03:14 PM
I would assume in the following that 'instance' being set to 'nullptr' should cause the instance of myClass that was created to no longer have any pointers pointing to it, and therefore be 'destroyed': ref myClass { public: myClass() {} ~myClass() {} // never called !myCl...more >>

__boxing helena - i mean parity...
Posted by Peter Oliphant at 11/14/2005 11:11:50 AM
OK, I'm mixing old style with new style, so sue me... : ) Will under old syntax, I'm able to create a SerialPort instance. But, when I try to convert the Parity proerty to a String*, I get the following compiler error: error C3610: value type must be 'boxed' Here is the code: Serial...more >>

Casting from non-const to const (C2440)
Posted by RalphTheExpert at 11/14/2005 10:34:36 AM
Why am I getting the following C2440 error? public __gc class X { String* Y[]; X(); // Construct Y public: const String* get_Y() __gc[] { return Y; // C2440 error } }; I'm guessing it has something to do with String's copy constructor ... but it surely...more >>

SerialPort class code example
Posted by Peter Oliphant at 11/14/2005 9:09:01 AM
On this MSDN2 webpage describing the Framework 2.0 SerialPort class: http://msdn2.microsoft.com/en-us/library/30swa673(en-US,VS.80).aspx there is the following text under 'Example': "The following code example demonstrates the use of the SerialPort class to allow two users to chat from tw...more >>

VS2005 Attempt to Run Simple Console App Fails
Posted by pvdg42 at 11/14/2005 7:08:12 AM
Two installations of VS 2005 Pro RTM. Same symptom with both. Simple Win32 Console application compiles fine, but when I attempt to run (with or without debugging), message appears: failed to find mdvcp80d.dll. A search reveals the file is present (two instances, 1004 kb each). Anybody else see...more >>

BUG: An exception does not propagate correctly to the calling function in a Windows Forms applicatio
Posted by RalphTheExpert at 11/14/2005 4:52:40 AM
This thread is a continuation of a thread with the Subject "Unhandled exception - Different under debugger and non-debugger". (http://www.dotnetnewsgroups.com/newsgroupthread.asp?ID=186902) Oleg and Carl: Carl wrote: "I would think the only fully sanitary, guaranteed to work way would b...more >>



GDI (-) & Translucent brush
Posted by Lloyd Dupont at 11/14/2005 12:00:00 AM
In my C# & MC++ app there is some drawing done through GDI (not +, but win32). I would like to be able to create a translucent HBRUSH. the RGB macro create only solid color... and, anyway, CreateSolidBrush ignore the higher byte. Any idea? I though I might do some trick with CreateDIBPa...more >>

sockets async?
Posted by iwdu15 at 11/13/2005 3:08:01 PM
hi, this should b a simple question...does the socket class use async? like in vb u have to tell it to use async, but in c++ i cant find either, its just "listen" or "connect"...is it async or sync? -- -iwdu15...more >>

gdi drawing
Posted by iwdu15 at 11/13/2005 3:06:01 PM
hi, this is a n00b question but when i draw on a panel in my form using GDI and a pen, but when i minimize the form, or put anything in front of the item in drawing on, the graphics go away. how can i fix this? -- -iwdu15...more >>

unions and /clr
Posted by Peteroid at 11/13/2005 10:42:20 AM
I believe this is not allowed: union comboVar { int i; double d ; }; ref class myClass { comboVar m_Var_1 ; // error, no unions in ref class comboVar* m_Var_2 ; // error no pointers either comboVar^ m_Var_3 ; // error, not these either } ; Is there a ...more >>

pure virtual functions and /clr
Posted by Peteroid at 11/13/2005 5:19:20 AM
I'm trying to create an abstract base class with a pure virtual method (using /clr and VS C++.NET 2005 Express). This will do the trick: ref class baseClass { protected: virtual void VMethod( ) abstract ; // i've tried '= 0' syntax too, no luck } ; But, whenI try to create a chi...more >>

C++ Interop Memory
Posted by Urs Vogel at 11/12/2005 9:24:11 PM
Hi 1. Is Marshal::AllocHGlobal(IntPtr) always pinned memory? 2. Is Marshal::AllocHGlobal(int) moveable or pinned memory? MSDN doesn't really explain that little difference ... Thanks, Urs ...more >>

Could not find type 'bool'
Posted by tdavis_acrc at 11/11/2005 12:40:52 PM
the visual editor component refuses to work and I get his brain dead warning when I try to use it I compile and run clean, but the visual dialog editor is broken. anyone have a clue how to slap this up-side the head, as it were? ....using Visual Studio C++ express edition ...more >>

Talking to a standard serial port
Posted by Peter Oliphant at 11/11/2005 11:37:28 AM
Is there a convenient function that will allow reading a standard serial port (ala the kind that a mouse was typically plugged into before USB came out)? I can also use DirectX if this would make it easier than without it... In any case, what do I need to know to talk to a serial port using M...more >>

Conversion from 2003 to 2005 just too hard
Posted by Peter Oliphant at 11/11/2005 10:11:45 AM
I've been trying all morning to convert my 2003 project (managed) to 2005 (/clr since I have both managed and unmanaged code). I'm guessing I have tens of thousands of lines of code to change. Did a lot of converting '__gc' to 'ref', converting '*' to '^', converting 'new' to 'gcnew'. Of cours...more >>

Unhandled exception - Different under debugger and non-debugger
Posted by RalphTheExpert at 11/11/2005 9:49:12 AM
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER // EXPRESSED...more >>

After conversion to 2005 now I get an error on exit
Posted by Peter Oliphant at 11/11/2005 8:33:56 AM
I got my 2003 code to compile in (old syntax) 2005. It runs, except I now HAVE to set my Form to DoubleBuffered or else my drawn primitive graphics flicker like crazy (which I had handled in 2003 via manual double buffering, which I now removed). Anyway, the application works, but now exits...more >>

How do I handle private virtual methods in (old syntax) 2005 (Express)?
Posted by Peter Oliphant at 11/11/2005 8:16:48 AM
I got 2005 Express to prepare for the arrival of my company's MSDN full version. Upon loading my project it was converted successfully, but did warn me modifications would have to be done for it to compile (which I expected). I then compiled, and got all the errors removed, and I was left with...more >>

I can't get Visual C++ to run on my system
Posted by joejrk at 11/11/2005 5:27:54 AM
I am not very fluent with computers, but I just got a new system wit Win XP Pro x64 and it works great, but I can't install Visual Studio o it. Is there anything I can do, or is there a newer version - joejr ----------------------------------------------------------------------- Posted vi...more >>

ATL composite control hangs in MFC
Posted by Paul Kia at 11/11/2005 4:41:03 AM
I have an ATL composite control which I drop into a tab control dialog page of an MFC application. When I click on the composite control and then click anywhere outside the MFC application, the application immediately hangs! Spy++ indicates that the application is hanging on the WM_GETDLGCODE ...more >>

algor needed for SYSTEMTIME double
Posted by beginthreadex at 11/11/2005 3:11:44 AM
Does anyone have a good replacement for VariableTimeToSystemTime ... which is really just a double that's pushed with some math to a struct for the day, year, second, etc. What I have is the double and really would like to have it in a structure that have the milliseconds. This would be EXTEM...more >>

Manifests and VC8
Posted by Richard Grimes at 11/11/2005 12:00:00 AM
I have just installed VS2005 RTM on a machine that has *never* had any of the beta versions. It did have VS2003, but I uninstalled that. I built a DLL with the new managed C++ syntax. The linker generated a manifest, so far so good. The manifest says that there is a dependency to Microsoft....more >>

Control grid
Posted by Tony Johansson at 11/10/2005 9:43:47 PM
Hello! I need a rather advanced control grid from somewhere. I know that I might have to buy the framework for this control grid. Have you any control grid that you can recomment to buy from some company on internet.? //Tony ...more >>

Modeless Property Sheet
Posted by bobnotbob at 11/10/2005 8:55:45 PM
In Visual C++ .NET: I am trying to program a modeless CPropertySheet. When I start it up modal, there are three buttons below the property pages -- OK, CANCEL, and APPLY. But when I start it up modeless, those buttons are not there. Why is this? ...more >>

VC8 Internal Compiler Error question
Posted by James Edwards at 11/10/2005 7:31:03 PM
I got an internal compiler error building a .cpp file with the new VC8 C++ compiler. I sent the error report to Microsoft using the new /ERRORREPORT mechanism. Is this enough information for MS to repro the problem, or do they need the preprocessed src file as well?...more >>

VS.NET 2005 'array' seems more complex to me than '__gc[]'
Posted by Peter Oliphant at 11/10/2005 3:45:58 PM
While it does look like 2005 does use a better syntax in general for garbage collection than 2003, here is something I think went the other way. arrays. Do people really think that: array<MyClass ^> ^ MyArray = gcnew array<MyClass ^>(100); is a better syntax than: MyClass* MyArray __g...more >>

Managed C++ will not be supported in the future...
Posted by Peter Oliphant at 11/10/2005 2:01:32 PM
At the following link: http://msdn2.microsoft.com/en-us/library/b23b94s7 there is the following quote near the top of the page (pay special attention to the last sentance): "For Visual C++ 2005, C++ includes new features for targeting virtual machines with garbage collection, such as th...more >>

Deployment problem with mixed mode dll
Posted by rudi NO[at]SPAM lambda-computing.com at 11/10/2005 8:27:41 AM
Hi everybody, I have a problem with a mixed mode application. It consists of an unmanaged C++ dll, a "mixed mode" dll and various VB.NET dlls using the mixed mode dll to talk to the unmanaged dll. When running on a development machine, everything works just fine. But when deploying on a pro...more >>

Endless Loop in C-Code when Using /Og
Posted by Bev in TX at 11/10/2005 6:11:07 AM
We are using Visual Studio .NET 2003. When using that compiler, the following example code goes into an endless loop in the "while" loop when the /Og optimization option is used: #include <stdlib.h> int resize(int *incsize, int min_size) { while(*incsize <= min_size) { *incsize = ...more >>

V C++ Help.....
Posted by a_deano at 11/10/2005 4:28:02 AM
Hi, I am not totally new to programming for Windows but may have bitten off more than I can chew. My problem is, I would like to install a hook (using SetWindowsHookEx) to monitor mouse movements as I am testing some new hardware we are developing. So, I decided to tackle the .net managed ...more >>

probing for CLR
Posted by bonk at 11/10/2005 12:00:00 AM
How can I test in a culture- and operating system independent way if the ..NET Framework is installed (and in a certain version) on the target machine using vc++ 6 ?...more >>

Precompiled Headers when building Static Library
Posted by Kevin Frey at 11/10/2005 12:00:00 AM
I am working on a test migration of our project to Visual Studio 2005 Beta 2 as a precursor to the availability of the full release of VS2005. The most onerous problem so far concerns the requirement by LINK.EXE that if an object file has used precompiled headers, then the resulting "precompi...more >>

Strange behaviour with mixed-mode C++ program
Posted by ralphsieminsky NO[at]SPAM hotmail.com at 11/9/2005 4:08:35 PM
I am seeing a strange behavior with a managed/unmanaged C++ program. The program is a large application made of DLLs, COM components, and an exe. When I recompile the exe with /clr a problem occurs: at some point, deep down the stack far from main() and far from the managed to native transiti...more >>

marshaling an unmanaged struct
Posted by Lee Crabtree at 11/9/2005 2:52:22 PM
I have several unmanaged struct types that I've created equivalent managed struct types for. How do I marshal the managed structs into their unmanaged versions and vice versa? Here's a quick example of what I'm working with: unmanaged C++: typedef struct _UStruct { UCHAR length; ...more >>

Text pixel width and height
Posted by Peter Oliphant at 11/9/2005 10:50:26 AM
Given a Font and a String*, how can I find out the PIXEL width and height of the resulting text displayed on the screen? Obviously this is necessary to center text, especially those using proportional fonts... Thanks in advance for responses! : ) [==P==] ...more >>

Managed code, .H and .CPP
Posted by Ignazio at 11/9/2005 7:41:15 AM
When creating forms with Visual C++ 2005, all the code for building the interface (the InitializeComponent method) and event handlers are set in the ..H file, as they were inline methods. So I ask, for managed code they are effectively inline methods or they are handled indifferently if they a...more >>

Auto Complete of Variable Names
Posted by Brakeshoe at 11/9/2005 5:08:07 AM
I would like to find out how to turn on the Auto Complete variable names feature while editing source code in Visual Studio. It seems to appear on intermittantly, and when it does the variable list is incomplete or contains variables that do not even exist in the project being worked on. It ...more >>

Trying to create a custom CListBox control that uses a CRichEditCt
Posted by Pat Moline at 11/8/2005 2:12:02 PM
Today, we have an informational dialog where the information is displayed in a RichText control. The only action for the user is to press the OK button to dismiss the dialog. My desire is to enhance this dialog by adding a “Go To” button where the user would select one of the inf...more >>

how to implement interface with argument "int (__gc*) __gc[]"
Posted by kchui NO[at]SPAM yahoo.com at 11/8/2005 1:03:10 PM
I have a C# interface as: public interface IBar{ void TestParam(ref StringCollection a, ref int [] b); } And I need to implment it in Managed C++, and I try to implement it as: public __gc class Foo : public IBar { public: virtual void ITestParam::TestParam(StringCollection __g...more >>

VS Launch
Posted by Tom Serface at 11/8/2005 9:38:39 AM
I attended the VS Launch in San Francisco yesterday. To be fair, the launch was shared with SQL Server 2005 and BizTalk 2006, but I was mostly interested in Visual Studio. Most of the special talks were centered around using VS with SQL and BizTalk as expected, but I got a chance to talk to ...more >>

How to create more than one executable files on VC++
Posted by m_muse at 11/8/2005 12:45:51 AM
Hi, I want to know how can I create 2 executable files with one workspace on VC++. I want to create two executable files just by one active project. Thanks in advance -- m_muse ------------------------------------------------------------------------ Posted via http://www.codecomm...more >>

using MFC and windows form together?
Posted by Tony Johansson at 11/8/2005 12:00:00 AM
Hello! We have at present time VS2003 . We have an application which is written in VS6.0 and is badly written and designed so we will rewrite most of this using VS 2003. I just want to have my opinion confirmed from you. As I mentioned we will rewrite most of the application using VS2003 ...more >>


DevelopmentNow Blog