Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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 > october 2006

Filter by week: 1 2 3 4 5

Dll is Not Registering propoerly
Posted by CrimeMaster at 10/31/2006 11:02:45 PM
Hi, I have make a toolbar that integrates with IE and windows explorer.This toolbar is Properly register in Win XP and 2000 But when i m trying to register it with Windows 2003 its not getting registered, could any one Help me regarding this, i have write the following script in to the RGS file...more >>


My program sometimes can't exit normally
Posted by chris at 10/31/2006 6:06:06 PM
When click X or other exit entry, OS will ask me to report error to MS, then i use windbg to debug, it report:Unknown exception - code c0020001 (first chance) Does anybody know what is the problem? ...more >>

System Tray Application
Posted by Jay at 10/31/2006 10:43:18 AM
Hey There, I have a system tray application that is running, and it needs to communicate with a Windows Service that I wrote. My problem is that if a user switches to another desktop, I need the service to have communication be able to distinguish that data needs to be sent to app A instead...more >>

issue with #include
Posted by --== Alain ==-- at 10/31/2006 12:00:00 AM
Hi, Under VC++.NET, i have a stupid issue with #include statement. Usually when we include some *.h file, we need to declare them before any #using <> or #using namespace... to avoid issue at compilation time. However, when i write #include "commctrl.h" as below in my *.h file : #pragma ...more >>

OnDrawColumnHeader and LIstView
Posted by --== Alain ==-- at 10/30/2006 6:12:43 PM
Hi, I have some little issue when i want to redraw the columnHeader of my ListView. Basically i display a little arrow to show the sortOrder of each column. For sure only the clicked column is sorted. here is my code located in OnDrawColumnHeader overriden method: .... if(e->ColumnIndex ...more >>

Static initializers with option /CLR in dlls
Posted by Jesper Schmidt at 10/30/2006 6:40:04 AM
Hi, I have a relatively large C++ code base, which requires that static initializers are called when a dll is loaded. This seems to work well for native code, but it does not work for files compiled with the /CLR option enabled. I will try to give a simple example that illustrates my problem....more >>

Edit control balloon tooltip blanks Winforms controls (MFC/.net mi
Posted by Aled Hughes at 10/30/2006 5:57:03 AM
Hi, I have an MFC application that has a CDialog based dialog box that contains a .net UserControl (via DDX_ManagedControl) as well as a native edit control which has the ES_NUMBER style set. Now a very strange thing happens: If I press a non-numeric key in the native edit control, up pops a ...more >>

Overhand a function pointer from managed to unmanaged
Posted by interX at 10/30/2006 5:06:05 AM
Hi, I have a little problem with managed/unmanaged in Visual Studio 2005 (Compiler setting /clr). I need to overhand several function pointers from managed to unmanaged. These function pointers are stored in an unmanaged struct and this struct is then overhanded by reference to the unmanaged ...more >>



Is it possible to extend system search?
Posted by Lloyd Dupont at 10/30/2006 12:00:00 AM
I have an application with produce document/file with a lot of textual information into it (in a TAR-GZ format). This application is for the general public (as opposed to corporate, so I cannot assume too much on what's on my user's computer, except we require XP or later). Now the Windows...more >>

stl list's const_itertor problem
Posted by Abubakar at 10/29/2006 9:35:31 PM
Hi, I'm using stl's list class. For iterating it I'm using its const_iterator. Lets say I have a: list<char* >::const_iterator m_myitr; Now: void proc1() { if (some_condition_true) mylist.remove ( m_myitr ); } void proc2() { // here we have to use m_myitr assuming that ...more >>

trouble passing function pointer
Posted by peter at 10/28/2006 5:06:51 AM
I can't get this code to link properly. I got two error during link: error LNK2028: unresolved token (0A00000C) "extern "C" int __stdcall EnumFontFamiliesExW(struct HDC__ *,struct tagLOGFONTW *,int (__stdcall*)(struct tagLOGFONTW const *,struct tagTEXTMETRICW const *,unsigned long,long),lon...more >>

ListView and GetHeaderCtrl
Posted by --== Alain ==-- at 10/28/2006 12:00:00 AM
Hi, i have a ListView (.NET control) on which i would like to display images in the header. For that purpose i was thinking to use the MFC function GetHeaderCtrl() with GetItem and HDITEM structure. I want to use such association because i want to be able to display image on the right...more >>

question related to sockets
Posted by Abubakar at 10/27/2006 8:32:56 PM
Hi, I'm working on a sockets app (using all those connect, socket, recv, send stuff). There is one problem on just one of many pcs i deal with. This pc, sometimes my app crashes on it, which is pretty usual cuz of application bugs and I fix them of course. But the problem is that the ports ...more >>

An unhandled non-continuable exception was thrown during process load
Posted by B. at 10/27/2006 6:36:36 PM
I know there is similar post few years back, but it didn't help solving my problem: We have a big project. Our legacy code is ported to VC++ 2005 recently. We have new feature written in C#.Net. We have developed a interop dll in the middle so that our legacy code can call C#.Net code. Everythin...more >>

XML documentation in unmanaged C++
Posted by Bob Altman at 10/27/2006 3:41:10 PM
I thought I read somewhere in the MS documentation that XML documentation is compiled in C++, but the C++ code editor obviously doesn't do anything interesting when I enter "///". What's the deal with C++ and XML docs? Is there an add-in available to help with entering XML docs? TIA - Bob...more >>

Removing Certain warning
Posted by Jay at 10/27/2006 2:47:24 PM
Hey There, I have this line of code: retVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE,subKey,0,KEY_READ,&OpenKey); and it produces this warning: warning C4312: 'type cast' : conversion from 'DWORD' to 'HKEY' of greater size What can I do to have this warning be removed? Than...more >>

Losing all previous preprocessor symbols when adding one
Posted by David W at 10/27/2006 9:55:43 AM
In VS .NET 2003 (SP1) I wanted to add a preprocessor symbol to all configurations of all projects in a solution. I selected all the projects and then went to Properties, where I went to the preprocessor symbols edit box. Nothing was in there, presumably because no symbols are common to all select...more >>

C# to C++.Net conversion
Posted by Jamie McQuay at 10/27/2006 9:34:20 AM
Hi, I would like to translate the following to C++.net (v2.0) private delegate void TestFunction(); TestFunction[] TestFunctionArray; Cheers, Jamie ...more >>

dll problem,help me:)
Posted by rxgmoral at 10/27/2006 4:56:32 AM
dll problem,help me:) i create dll project ,the dll is Use MFC in a Static Library i hope exe call ListCtrl class from dll ==================DLL==================== <<<<<<<<<<ListCtrl.h>>>>>>>>>>>>>>> #pragma once class AFX_EXT_CLASS ListCtrl :public CListCtrl { public: __declspec(dll...more >>

vc is faster, no?
Posted by Ari at 10/26/2006 8:11:22 PM
Hello all, I have developed my companies product using visual basic.net. I've got it designed how I like it. I'm ready for the speed. However, because my main lags in the program are the network connections I would like to ask if httpwebrequest are faster in vc++? Could I rewrite my networ...more >>

Problem with MFC extension DLL, threads, and .Net loader lock
Posted by Al Norman at 10/26/2006 3:28:11 PM
We have two separate DLLs that do not interact (directly, at least). One is an MFC extension DLL that was built back in VC++ 6 days (but has been recompiled with VS2005). The other is a DLL that contains .Net functions wrapped in C++ (as described by Paul DiLascia -- see http://msdn.microsof...more >>

Pass CString and byte array from native C++ to managed C++
Posted by Notre Poubelle at 10/26/2006 11:21:02 AM
Hello, I have a scenario where my CPP project is not compiled with CLR support, but some of the CPP files have the /clr option set. In file1.cpp, the /clr switch is not set. In file2.cpp, the /clr switch is set. file2.h is the header for file2.cpp, and this header is included in file1.c...more >>

Converting an array to a buffer
Posted by Damir Dezeljin at 10/26/2006 10:53:01 AM
Hi. I'm developing an application using managed C++. My application has to use a DLL developed in standard C++. The mentioned DLL implements a class for file operations. There is a class method uses a pointer to a buffer (e.g. BYTE *pBuf = new BYTE [1024]) as input / output. My program h...more >>

Identify Which Desktop an App is Running On
Posted by Jay at 10/26/2006 8:54:24 AM
Hey There, Is it possible to get an unique identifier for a desktop that a particular app is running from, from a service? If there are two instances of the app running on different desktops (one desktop is locked, the other is in use) then the service should have different values for eac...more >>

Cross include headers
Posted by Maart_newbie at 10/26/2006 3:29:06 AM
Hi all, Can anyone tell me how I can include one header Form1.h into another header Form2.h and the other way around without evolving into compile errors? Both headers contain only one class in which I want to declare an instance of the class in the other header file. I assume that through...more >>

Zahid's contact
Posted by Abubakar at 10/26/2006 12:00:00 AM
Whats Zahid's tel num? -ab. ...more >>

.Net Forms application, File and FolderDialogs
Posted by Ed_C at 10/25/2006 10:14:01 AM
Hi there, We have a C++/CLI .NET 2 forms based application where the .NET forms front end lives in an ATL server solution, and uses COM to talk with a separate back end process. For development, the executable was built as a pure .NET solution incorporating all the back end code, and wor...more >>

beginner question - where to find include files?
Posted by peter at 10/25/2006 12:21:28 AM
I haven't used vc for years. I just downloaded the 2005 vc express and the IDE. I'm trying to compile a program that uses a LOGFONT structure. I think it is defined in fontclass.h or windows.h, but I can't find any .h files in the vc express installation. Is it a separate download, or do I ha...more >>

DefaultValueAttribute
Posted by --== Alain ==-- at 10/24/2006 8:22:14 PM
Hi, I would like to define the default value of my property. My property is from type Bitmap^, therefore i was thinking to do : [DefaultValueAttribute(nullptr)] but i does not work. how is it possible to define this property to no pointer ? thx. ALain...more >>

Can't see _CrtDumpMemoryLeaks output when using managed C++ from Winforms app
Posted by Stephen Walch at 10/24/2006 10:43:41 AM
I have a managed C++ assembly that wraps several unmanaged libraries. I excercise this assembly by calling it from a C# WinForms app running in the Visual Studio.NET 2003 dubugger. At a certain point in processing call _CrtDumpMemoryLeaks() to look for possible memory leaks in the unmanaged ...more >>

audio functions in Winmm.dll
Posted by ray well at 10/24/2006 10:06:08 AM
i need to play (in a windows app) all or part of wav/mp3/midi files thru software without a user interface. i also need to allow the user to choose the midi instrument to play the midi files by filling a list box with available instruments. i would prefer not to have to install a windows me...more >>

Referencing the owner of a form
Posted by Maart_newbie at 10/24/2006 1:52:50 AM
Hi all, I have a an instance of a form, lets say Form2, that is constructed from within a event handler of an instance of Form1, subsequently I call ShowDialog with the instance of Form1 as its owner: form2 = gcnew Form2(); form2->ShowDialog(this); Form1 is constructed within main throug...more >>

Problem creating file version info.
Posted by Dror Hershkovitz. at 10/23/2006 1:43:01 AM
Hello, I'm compiling an .exe file on VS2005 under C++ without framework support. For some reason, when I look at the properties of the .exe file there is no version tab although the project does have a resource file and the file version is defined there. I tried to create a new project a...more >>

Error Mixing Managed and Unmanaged Code
Posted by Jared Kail at 10/22/2006 11:29:38 PM
I've never mixed managed and unmanaged C++ before, but I've done a lot of "research" out on the web. Using some examples out there, I wrote this: #using <mscorlib.dll> using namespace System; namespace ntMgdCls { __nogc class ntUnmgdCls { public: ntUnmgdCls::ntUnmg...more >>

Image as property
Posted by --== Alain ==-- at 10/21/2006 1:44:58 PM
Hi, I'm creating my own .NET control and i would like to allow user to allocate an image as property. for that i used the following code : #pragma region public Property : ImageSortAscendant // Allow user to select the image which will be displayed for column sorted ascendantly [Descr...more >>

Managed C++/CLI documentation - doxygen/javadoc-like tagged comments ?
Posted by Ivan Vecerina at 10/21/2006 12:00:00 AM
What tagged comment syntax do you use to document C++/CLI code ? As far as I know, doxygen does not currently support C++/CLI. Are there other/similar tools? Does Microsoft provide an equivalent solution? (the more XML-like syntax used in C#?) Thanks -Ivan -- http://ivan.vecerina.com/c...more >>

Initialization of static variables in a class library
Posted by Jesper Schmidt at 10/20/2006 5:29:12 PM
When does CLR performs initialization of static variables in a class library? (1) when the class library is loaded (2) when a static variable is first referenced (3) when... It seems that (1) holds for unmanaged C++ code, but not for managed code. I have class library with both managed and...more >>

Debug Build fails, Release Build OK - VC++ 6.0 to VS2005 port
Posted by nmrcarl at 10/20/2006 4:08:02 PM
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release version to build successfully. Unfortunately, it crashes right away when I start it. So now I ...more >>

Why can't Marshal::GetDelegateForFunctionPointer() work on C++?
Posted by Rory Plaire at 10/20/2006 1:46:02 PM
After searching and experimentation, I found the note in the remarks section of the MSDN doc on Marshal::GetDelegateForFunctionPointer (http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getdelegateforfunctionpointer.aspx) - You cannot use this method with fun...more >>

constructor confusion
Posted by Ian at 10/20/2006 12:47:40 PM
I was under the impression that the following produced the same IL code: A ^a = gcnew A(); A a; The first line creates object 'a' using gcnew while the second line creates object 'a' using stack based code. I understood both methods produce the same object - is this true? If not, ...more >>

SP with no results throws ODBC exception in CRecordset
Posted by Mike C# at 10/20/2006 12:29:11 PM
Hi all, I'm writing a little app that uses ODBC to call a SQL 2K stored procedure several times in a loop, with a different parameter each time. The SP can return no results in some instances. When no results are returned, the CRecordset throws an exception. I've tracked the problem down...more >>

StringCbPrintf - multiple params
Posted by mgonzales3 at 10/19/2006 2:42:02 PM
I'm trying to concat multiple params. My code only grabs the first param. /*******/ // Param1: OLE2T(menuItemsData[idCmd]) // Param2: pStrClipboardText int const arraysize = 30; TCHAR pszDest[arraysize]; size_t cbDest = arraysize * sizeof(TCHAR); LPCTSTR pszFormat = TEXT("%s"); ...more >>

VCBUILD.exe distribution
Posted by Marc at 10/19/2006 12:27:01 PM
Can someone tell me if I can freely distribute VCBUILD.exe with my application? I allow the users of my app to tweak the code via a dll build on the fly. I'd much prefer not having to ask my clients to download c++ express. TIA Marc...more >>

DLLs
Posted by MattMenard at 10/19/2006 10:29:33 AM
I'm still a bit of a newbie so bear with me. We've developed some DLL's in VC 2003. We're going to be moving these dlls between numerous systems and was wondering what the best way to determine if a particular dll was registered on that system or not. Do I simply go into regedit and do a globa...more >>

C++ interop /CLR confusion
Posted by ajtaylor NO[at]SPAM hushmail.com at 10/19/2006 4:42:22 AM
Hello, I wonder if anyone can help lift the cloud of confusion hanging over me at the moment ;-) I have a load of unmanaged code in a project that I am compiling NOT USING /CLR I have some managed code and I want to call some of the functions in the unmanaged code. So I create a file wit...more >>

private destructor and templates
Posted by Ben Voigt at 10/18/2006 11:56:30 AM
I have a POD type with a private destructor. There are a whole hierarchy of derived POD types, all meant to be freed using a public member function Destroy in the base class. I get warning C4624. I read the description, decided that it's exactly what I want, and ignored the warning. Now ...more >>

Function like "Generic::List<String^>^ buildList(String^ inParm)" and avoiding warning C4172: returning address of local variable or temporary
Posted by rsa_net_newbie at 10/18/2006 8:47:07 AM
Hi there, I have a Managed C++ object (in a DLL) which has a method that is defined like ... Generic::List<String^>^ buildList(String^ inParm) Now, when I compile it, I get "warning C4172: returning address of local variable or temporary". In good old 'C', that would indicate that a 'st...more >>

global forms?
Posted by lizii at 10/18/2006 2:16:16 AM
i have two forms - for purposes of explaining i will call them form A and form B one of which is a searching tool for the user. What i would like to do is somewhere in form A is call form B and leave it hidden - then when i say openBForm i just want to make that form Visible - then when they a...more >>

C# to C++ port
Posted by Luca at 10/18/2006 12:00:00 AM
Hi everyone, We have a dll component developed in C# and used by the other projects (exe) written in C#. This component has been tested and proved to be very robust component and so we are going to re-use it in another application (very large code base) which has been already written in un...more >>

c++ program does not run from server drive
Posted by marsze NO[at]SPAM yahoo.com at 10/17/2006 12:57:26 PM
Hi I succesfully finished a simple form program in VC express 2005. I tested the program in another machine, after installing the runtime libraries and .NET framework 2, and is working fine. Now' i'd like to make the program available from the network server drive to other users (after the...more >>


DevelopmentNow Blog