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 > threads for april 15 - 21, 2004

Filter by week: 1 2 3 4 5

how to maintain code for both OS i.e. Windows CE and Windows 2000
Posted by Shrikant at 4/21/2004 3:58:50 PM
hello cWorld I want to write code in VC7 , but that should run for both the operating systems windows 2000 and windows CE. Actualy I want to keep two different statements of code for these OS. I want do it by putting then under IF ELSE statement. Is there any way to do this. If any one can hel...more >>

Disabled CTreeControl question
Posted by Lars Grøtteland at 4/21/2004 2:10:13 PM
Hello! If I select an item in a tree - and disable the whole tree - all the items in that tree is "grayed". How can I avoid that? This is how I would like things to work - only one item should be grayed - and I should not be able to click on this tree. -- - Lars ...more >>

Rijndael algo. available in MS Crypto API?
Posted by Sean Kelly at 4/21/2004 11:17:07 AM
The old one, not the .NET version. I don't see it listed, but since it's available under .NET I thought I'd ask. Also, there are some API calls which are supposedly not available under most Windows installations (CryptBinaryToString, for example). I don't suppose this has changed? Basica...more >>

CArray and [] - operator
Posted by db01092001 NO[at]SPAM lycos.de at 4/21/2004 3:36:26 AM
Hello, I'm interested in the internal organization of CArray, especially the execution time for the members, the operator respective: Determines the use of [] in constant time (O(1))? What about the members RemoveAt() and InsertAt()? Are they executed in linear time (O(n), if n is the number ...more >>

Missing file/project properties
Posted by Stefan Slapeta at 4/20/2004 5:41:04 PM
Hi, In VS 6 you could get the real filename of any source file or project by clicking the right mouse key and selecting "properties". Is there any equivalence in VS 7.1 for that? (so far I have not been able to find any possibility to get the filename of a project or source file). Than...more >>

Compilation Error of std::map in Win32 Console Project
Posted by Avery Fong at 4/20/2004 3:11:03 PM
The following program will result in a compile error when building under Debug but will compile under Release. Why does is work under Release mode but not under Debug This program is developed under Visual Studio .NET 2003 in a Win32 Console Project // VectorInsert.cpp : Defines the entry point...more >>

#include <vcclr.h>
Posted by Tommy Vercetti at 4/20/2004 1:11:06 PM
I'm new to Managed C++ development, and I can't seem to get started. Every time I try to include vcclr.h I get bizarre compilation errors. I've isolated this to a really simple case: In Visual Studio .NET 2003, I do the following 1) File->New->Project 2) Visual C++ Projects->.NET->Win...more >>

Application Registration
Posted by John Smith at 4/20/2004 10:46:09 AM
I have nearly finished a new application and we want to protect our investment. We have purchased the commercial Dotfuscator and have learnt how to use it. What is the best way to implement product registration? Is there an example around? I have read that some people are using the HD Vol...more >>



Porting C++ to C++(.Net) Problem
Posted by sebastian.sosna NO[at]SPAM dregis.com at 4/20/2004 4:34:06 AM
Hello NG ! Iam developing in C# so my cpp knowledge is limited. Ive downloaded a C++ sample wich is doing some AD Job. U can get it here : http://support.microsoft.com/?id=302515 Ive tried to port into C++ (.Net) and ran into errors wich i have no clue whats this is about. After compiling ...more >>

Developing windows nt service using ATL 3.0
Posted by sureshbabu at 4/20/2004 12:01:07 AM
Hello everybody Can any one tell me how to develop windows nt/2000 service component which does some monitoring (any work. I would like to use vc++ 6.0 and AT Thanks in advance...more >>

Controlling the .NET runtime host provided by IJW
Posted by Bern McCarty at 4/19/2004 2:59:38 PM
If I want to use C++ Interop/IJW and I want the .NET runtime that I get to be STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST is there a way to do that short of writing to the hosting interfaces and starting up the CLR myself? Seems like controlling this sort of thing should be possible through t...more >>

Intercepting form events
Posted by Steve McLellan at 4/19/2004 2:33:18 PM
Hi all, I'm trying to override Form events (for example OnClosing or OnClose) with the intention of preventing the base class function from happening. My functions are getting called but so are the base class ones, which isn't what I want (for example, I was hoping an empty OnClose event would...more >>

string width in pixels
Posted by Rajko at 4/19/2004 2:25:51 PM
How can I mesure string width in pixels? I found : Graphics.MeasureString Method. It is in System.Drawing namespace. I need to use it in static library. Well, class Graphics does not have any constructors (at least in my MSDN). So, if I can't use System::Drawing::Graphics::MeasureString in st...more >>

Mixed question: Should I wrap unmanaged headers with #pragmas?
Posted by knormand at 4/19/2004 1:51:02 PM
I have an older MFC C++ app with some new Managed C++ being thrown in. Recently I turned on the /clr flag for one of my old .cpp files. I then placed '#pragma unmanaged' just below my #include statements near the top of the file. These headers contain older unmanaged class declarations. When runni...more >>

vc for windows programming
Posted by Asim Ahmed at 4/19/2004 12:20:35 PM
I have done some vc.net programming as part of a college course. However, all of it was based on console based apps. Could someone recommend a good book or site that focuses on vc++.net prog. for windows. Also, from your experience, how much tougher is windows prog. using vc compared to c#. Is ...more >>

Detecting mscorlib.dll?
Posted by mccoyn at 4/19/2004 7:31:04 AM
I have a header that is included from some files that use mscorlib and some that don't use it. One of the macros in this file uses the __pin keyword. When this header is compiled with a source file that doesn't use mscorlib I get the following error: fatal error C1190: managed targeted code req...more >>

cannot perform pointer arithmetic
Posted by at 4/19/2004 2:46:38 AM
this->user_information->Text = this->query->SList[this->listBox1->SelectedIndex]; sList is a SortedList i want to reach its valur by its index ??? i got this error error C2845: '[' : cannot perform pointer arithmetic on __gc pointer 'System::Collections::SortedList __gc *' ...more >>

how to define get set in VC++.net
Posted by at 4/19/2004 12:44:30 AM

Re: GUI in Visual C++
Posted by Sihombing at 4/18/2004 11:21:02 PM
Hi Anyone has any idea how to start the GUI for Visual C++ 6.0 Is it possible to develop the GUI in Visual Basic 6.0 and incorporate it to Visual C++ 6.0 ?...more >>

Template fails in function header
Posted by Peter Cusack at 4/18/2004 11:21:01 PM
I'm getting error C2062: type 'float' unexpected and error C2065: 'complex' : undeclared identifier when I try to compile this #include "stdafx.h #include <iostream> //Consol I/ #include <time.h> //So I can measure how long it take #include <complex> //Complex math suppor void fourn(complex <f...more >>

Right after Create window
Posted by Hai Ly Hoang at 4/18/2004 9:56:38 PM
Hi, I want to do an action (something like allocate memory...) right after my window (a CView) is created. how to that ? Thanks in advance ...more >>

Toolbar event
Posted by Hai Ly Hoang at 4/18/2004 9:23:56 PM
Hi, I have created an incon in the toolbar. But how to add event-handler to my new button (i'm using Visual Studio .NET) Thanks ...more >>

mundane file attributes problerm
Posted by powellmw NO[at]SPAM comcast.net at 4/18/2004 10:02:44 AM
Hi, I have a peculiar problem with trying to assess FileInfo Attributes. I am trying to do something like this FileInfo* fi = new FileInfo(fileName); if (fi->Attributes & Hidden) { // ... } However, the compiler issues the following errors error C2039: 'Hid...more >>

error C2440: '=' : cannot convert from
Posted by Ketil B at 4/18/2004 6:41:04 AM
Hi All Im geting the compiler error error C2440: '=' : cannot convert from 'short (__thiscall CMSComm::*)(void)' to 'short on this line sCommEvent = m_ctlMSComm.GetCommEvent sCommEvent is a short and m_ctlMSComm is the control varable for the MSComm ActiveX contro is...more >>

Really basic MC++ compilation error
Posted by Tommy Vercetti at 4/17/2004 10:18:05 PM
In Visual Studio .NET 2003, I do the following 1) File->New->Project 2) Visual C++ Projects->.NET->Windows Forms Application 3) Project->Add New Item->C++ File 4) Clear the new C++ file and replace with the two lines: #include "stdafx.h" #include <vcclr.h> 5) Build->Build Solut...more >>

R6002 "floating point not loaded" in Managed C++ DLL that links with LIBCMTD.LIB
Posted by wkew_rainbird1 NO[at]SPAM yahoo.com at 4/17/2004 9:52:50 PM
Hello everyone, I'm developing a mixed-mode Managed C++ DLL using .NET 2003, and to avoid the potential mixed-DLL-loading-deadlock issue discussed in MS KB article 814472 (http://support.microsoft.com/?id=814472), I've followed the steps in that article appropriately. However, our applicatio...more >>

thread parameters
Posted by powellmw NO[at]SPAM comcast.net at 4/17/2004 1:08:11 PM
I would like to pass an Object* to a delegated thread function. However, the framework does not accommodate this. I have seen examples using VB and even C#. In fact, C# appears to have language facilities that make accomplishing this very easy. However, I only have the luxury of coding this up i...more >>

Constructors, references, DotNet Strings
Posted by RLF at 4/17/2004 10:19:24 AM
Am upgrading a C++ console app to add a DotNet Front End. Have run into a couple of issues. The first one is basically a c++ question. I have a class which maintains a reference to an istringstream that is passed to it in the constructor. Since I won't have an istream to give it from the front...more >>

ANN: Microsoft Visual C++ Toolkit 2003
Posted by Thomas Scheidegger [MVP] at 4/17/2004 1:20:44 AM
The Visual C++ Toolkit is a free edition of Microsoft's professional Visual C++ optimizing compiler and standard libraries - the same optimizing compiler and standard libraries that ship in Visual Studio .NET 2003 Professional! Web: http://msdn.microsoft.com/visualc/vctoolkit2003/ Dow...more >>

how to add image in toolbar windos ce using VB.Net
Posted by Shrikant at 4/16/2004 6:27:46 PM
hi all, I want to now how to add images in Menubar using VB.Net for Windows CE. Pl. give me the right suggestion and code to put image in the menubar menuitem so that I can put it in the Toolbar with regards, -- Shrikant Chikhalkar Product Engineer, Manchitra Services Pvt. Ltd., New D...more >>

threading monitor efficacy
Posted by powellmw NO[at]SPAM comcast.net at 4/16/2004 3:24:00 PM
I have to ask a stupid question regarding Monitor. Wait() and Pulse() make be used to wait for and signal events in a given thread. However, neither can be used until calling within a synchronized block between calls to Enter() and Exit(). Am I missing something when I say that it seems u...more >>

how to define code block synchronous
Posted by powellmw NO[at]SPAM comcast.net at 4/16/2004 3:00:18 PM
Hi, I am trying to use the Monitor::Wait() function from C++. I get an exception saying "Object synchronization method was called from an unsynchronized block of code." So my question is simply: how do I synchronize a block of code? Best regards, Michael Powell...more >>

how to pass binary data from C# stream to fcn in Managed C++
Posted by wbaccay at 4/16/2004 2:16:04 PM
I have a byte[] of binary data received from a NetworkStream (C# code) that I need to pass to the IWMWriter object in a DLL written in Managed extensions for C++ (since the Windows Media SDK is not usable in C#) whose WriteSample function takes a byte* parameter Do I need to marshal data? I thoug...more >>

threading waiting on message queues
Posted by powellmw NO[at]SPAM comcast.net at 4/16/2004 1:19:57 PM
Hello, Here is my challenge. I have a thread awaiting events being sent via Queue. Currently I am checking the count and if there is a count, Dequeue() the next object and process it. By design, however, this is inefficient usage of CPU clocks. A more efficient usage could be to wrap Mon...more >>

Build always performs a Rebuild
Posted by Bill Rust at 4/16/2004 12:49:29 PM
I have a rather large ATL project that I converted from VC++ 6. Whenever I build it, VS.NET concludes the whole thing is out of date and rebuilds the entire project. This happens even immediately following a successful build of the entire project. Any idea why? Thanks, Bill ...more >>

C style string in managed class and <string.h>
Posted by mccoyn at 4/16/2004 11:51:06 AM
I am trying to use a C style string in a managed class. When I try to call a function like strcmp I get an error. For example, this code __gc MyClass char str _nogc [16] void foo() strcpy(str, "Hello") Would give the error error C2664: 'strcpy' : cannot convert pa...more >>

To create exe of a project (Release instead of debug)
Posted by Falquian at 4/16/2004 12:41:03 AM
Hello to all: Apparently when I create exe of the project I must select the configuration Release? instead of Debug that is the one that comes by defect. The problem that I have is that when I execute the application in way it release jump excepctions to me that does not jump to...more >>

Byte Packing
Posted by Gajendra at 4/15/2004 10:21:06 PM
How does the byte packing and the byte alignment work in VC++ compiler? What is the effect of #pragma pack(n) on the alignment and byte packing for example while using the structur struc double a char b char c } in a 8 byte packing the sizeof structure is 16. Could anyone exp...more >>

linker error compiling program direct x
Posted by endo55 at 4/15/2004 3:36:03 PM
Hi I've got the following errors when trying to compile a program cvision error LNK2001: unresolved external symbol _IID_IGraphBuilde cvision error LNK2001: unresolved external symbo _IID_IFileSinkFilter cvision error LNK2001: unresolved external symbol _IID_ICreateDevEnu cvision error LNK20...more >>

viewwing c# classes in managed code
Posted by Vladimir Scherbina Nickolaevich at 4/15/2004 3:18:35 PM
hello all, i have a problem connected with resolving names (in managed code) of a classes, wrriten in c#. for instance, if a I have an assembly named AAA, and a class named BBB, i cannot see BBB when I write in managed code AAA::, and even if I write AAA::BBB *c = new AAA::BBB(); i get an...more >>

hashtable unhandled exception
Posted by powellmw NO[at]SPAM comcast.net at 4/15/2004 7:55:03 AM
I am trying to utilize Hashtable to facilitate mapping one value to another. I have successfully added several such pairs. When using the enumerators to find keys upon subsequent manipulation, I get the following error. Any ideas why this is? Maybe I didn't initialize the table properly? An u...more >>

Throwwing exception from __gc class to c# class
Posted by stevencool007 NO[at]SPAM hotmail.com at 4/15/2004 5:23:23 AM
Hello, I have a problem with trowing exception from a __gc class to c# class. I have a wrapper class which wraps an unmanaged class. On a certain moment I check something in that wrapper and if the result is false, I throw a selfMadeException. The selfMadeException is extended from the Syst...more >>

compile error on wrong line
Posted by bob at 4/15/2004 2:01:10 AM
Hello, I use Microsoft Visual C++ .NET (version 7.1.3088) Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of code. The line number in the error message and that of the cursor do match but the real error is somewhere els...more >>


DevelopmentNow Blog