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

Filter by week: 1 2 3 4 5

How Do I Add Overrides to a form?
Posted by A Wieser at 6/30/2006 8:29:20 PM
I created a new Windows Forms Application, with a blank form. The first thing I want to do is override OnPaint, and draw a line across the window. I can't for the life of me figure out how I'm supposed to do this with Visual Studio. If I go to the class view, and click on form1 a bunch ...more >>


C++ ClassLib for C#
Posted by mike at 6/30/2006 7:13:53 PM
I'd like to port some C++ code to a .NET ClassLib for C# consumers. Am using VC2005, .NET 2.0 However I find that If I simply generate a C++ ClassLib using the = wizard... // SimpleCLib.h #pragma once using namespace System; namespace SimpleCLib { public ref class Class1 { // TO...more >>

C++ inheritance not working correctly in VS2005 when C# is involved.
Posted by DrZogg at 6/30/2006 6:06:15 PM
It can't be... say it isn't so... Yes.. there is a fly in the ointment This bug requires 3 projects... yes this is a real world production issue not some tinker toy thing. Start with a C# interface assembly we will call Interfaces namespace Interfaces { public interface ICqBase {...more >>

WebBroswer Object -> History
Posted by Jay Brodie at 6/30/2006 5:02:53 PM
I am trying to find a way to have the webbroswer object in my VC app to NOT write the browsed sites to the normal history for the deaktop computer. I have looked all over and cant find anything remotly close to what I need. Can someone shed some light on this for me? Can this be done or am ...more >>

Serial Port library in .NET C++
Posted by awu at 6/30/2006 12:52:27 PM
Hi, All: I need to use RS232 port on the PC to read to my window application and write out via the same port using separate the thread than my main thread. I plan to use .NET C++ MFC Application. I have been reading all the useful information on the web. I found Ramon deKlein 's "Serial lib...more >>

Some classes are not exported from MFC extension DLL
Posted by amitdedhia NO[at]SPAM yahoo.com at 6/30/2006 1:46:35 AM
Hi I am migrating a product code (originally written in VS2003) to VS2005. The application is written in VC++ (using MFC) and has mix of managed and unmanaged classes. It is a desktop based application which controls an instrument (a device) and interacts with it. I fixed all the compiler e...more >>

How to find out a file location?
Posted by Victor at 6/30/2006 1:17:28 AM
Please, could anybody kindly point me to a possibility to find out the location of a file contained in a VC++ 2005 solution? What I mean is really the location in the file system on the hard drive. In the VC++ 6 it was possible to see this information in the properties of a file - but now I mi...more >>

using unmaged dll in managed c++
Posted by Petded at 6/30/2006 12:19:23 AM
I have seen some articles on using unmanged dll's in managed c++, but they all see to require knwing the paramters and structures of the the dll functions to be called. I have this freeware dll that provides socket functions, but there is no info on its internal structure so i can declare its ...more >>



Solution to C3918 error
Posted by KK at 6/30/2006 12:00:00 AM
Dear All I don't find any solution to error C3918 Error Message usage requires 'member' to be a data member C3918 can occur for several reasons related to events. Please help me how to get rid of this error? Thanks & Regards Krishna ...more >>

Using stored procedures in C# for postgreSQL using ODBC
Posted by nishi.hirve NO[at]SPAM gmail.com at 6/29/2006 11:04:02 PM
Hello, I am writing one simple application in C# in which i m writing some queries for retriving data from database. Database used is postgeSQL which is used through ODBC. I want to write queries using stored procedures, I don't know where to write stored procedures for postgreSQL. I have w...more >>

how make new SDI Window with different view in MFC?
Posted by Neo at 6/29/2006 6:24:01 PM
I am going to make SDI base application in MFC, which has a button for "New Window", will show new window with different view. How I can solve this problem? Main window view class inherited with CListView, and New Window view class inherited with CFormView. ------------: Following wi...more >>

Registry (or other example)
Posted by poojo hackma at 6/29/2006 10:01:25 AM
Using Visual C++ 2005 Express (CLR): I can't seem to find an example or documentation on how to read/write information to the Registry. Are Registry Settings now outdated? What else could I use to store things like file locations, etc? I'm coming from Borland C++ Builder, and I'm tryin...more >>

Problem linking managed DLL to native DLL
Posted by Dave Burns at 6/29/2006 9:15:40 AM
I have the following situation: There are two dlls in question: a c++ dll (native) and a c++/cli dll (managed) with /clr option enabled. Managed dll links with native dll. Native dll exports a class ClientSession with a method GetJob. Managed dll references this method and compiles just...more >>

Reg Visual Studio and clearcase
Posted by rohinichandrap NO[at]SPAM gmail.com at 6/29/2006 9:08:50 AM
Hi , I have quite a few questions about Visual Studio :Net 2003 and clear case Could anyone please help me with the answers. I have converted a workspace abc.dsw from visual studio 6 to visual studio .Net 2003 which has three projects a.dsp,b.dsp,c.dsp. As a result of conversion I see t...more >>

Detect if memory is "deletable"
Posted by maruthir123 NO[at]SPAM yahoo.com at 6/29/2006 3:08:42 AM
Hi, I have a wchar_t pointer. Based on some conditions I assign string literals to it and on some other conditions, I allocate memory and assign it to this. Is there a way to find out while deleting if the memory is deletable. I get an error if I try to delete this pointer when Literals are assi...more >>

Localization
Posted by Microsoft at 6/29/2006 12:00:00 AM
Dear All, Who knows how to develop multi-language software with VC++.During the localization, how to localizate the resource and how to localize the text? Thanks Joe ...more >>

How to detect if Auto-update is enabled
Posted by elitecodex NO[at]SPAM gmail.com at 6/28/2006 6:00:58 PM
The topic pretty much says it all. I want to detect if the user has auto-update enabled/disabled using c++ (inside Windows XP). Is there an API call or a registry entry to check? Im having a hard time finding information on this. Thanks, elitecodex ...more >>

Checking Bad Pointers
Posted by Mike C# at 6/28/2006 4:31:06 PM
Is there a better way than IsBadReadPtr() to check for a bad pointer? Thanx ...more >>

vc w/clr: How to call an executable?
Posted by poojo hackma at 6/28/2006 4:11:42 PM
Does anyone know how to call an executable from within Visual C++ 2005 Express (using the CLR)? For example, click Button1 to launch Microsoft Paint: System::Void Button1_Clicked(System::Object^ sender, System::EventArgs^ e) { // what can I use to open MS Paint? } T...more >>

How to store a pointer to a ref class (C++/CLI newbie)
Posted by Ivan Vecerina at 6/28/2006 4:05:22 PM
We are trying to use a .NET form ("Form") from a non-managed C++ class ("Engine"). The Engine class needs to create the form once (e.g. at construction), then will be displaying the Form and running a modal loop a few times. At destruction, the form will be closed and disposed of. So I wanted...more >>

Passing STL parameter from managed code to native DLL member function
Posted by matthew breedlove at 6/28/2006 2:49:22 PM
I have a Managed VC++ WinForms app in VC8 calling a member function of a class in a native DLL. My managed code is similar to this: System::Void btnTest_Click(System::Object^ sender, System::EventArgs^ e) { Receiver r; std::vector<char> v; v.push_back('A'); r.DoTest(v, 50); } ...more >>

Parse date and time in unmanaged C++
Posted by Bob Altman at 6/28/2006 1:57:17 PM
Hi all, I need to simulate current date and time and provide integer values for the current year, month, day, hour, minute, second, and millisec. I need to do this in unmanaged C++. My first inclination is to do roughly the same thing that I would do in managed code: I would maintain a 64-b...more >>

Code Snippets
Posted by Juliano.net at 6/27/2006 8:12:20 PM
Does anyone know where can I get some Code Snippets for Visual C++ 2005? ...more >>

XML Parsing
Posted by Jose Cintron at 6/27/2006 5:39:26 PM
The XML file looks something like this... --- Start XML --- <?xml version="1.0" ?> <VULNERABILITIES> <PROGRAM_VERSION>0.0.1</PROGRAM_VERSION> <CONTROL_VERSION>0.0.1</CONTROL_VERSION> <VULNERABILITY> <V_SHORT_NAME>SOMETHING</V_SHORT_NAME> <V_LONG_NAME>SOMETHING</...more >>

Managed to unmanaged perforformance - opinions sought
Posted by Toadfather at 6/27/2006 2:32:41 PM
Hi all Exiting COM ATL DLL wrapping a C++ library. Interoping from a C# application, passing a large string containng XML (5-130kb). Need to significantly improve performance of both the interoping and the performance of the native functions (performance critical app). Opinions sought on mo...more >>

CDatabase Transactions
Posted by Mike C# at 6/27/2006 2:28:43 PM
Hi all, Have a quick question. I have an app that connects to SQL Server via the MFC CDatabase class. I'm doing bulk loading using the ODBC bulk opns extensions for SQL Server. When I try to wrap my bulk inserts in a transaction using BeginTrans() and CommitTrans(), it doesn't work. Whe...more >>

How to compile ATL module with CLR
Posted by Genady Beryozkin at 6/27/2006 9:18:02 AM
Hi, I've read the article at http://msdn2.microsoft.com/en-us/library/ms235211.aspx about how to compile MFC/ATL code, but I still have one question unanswered: Should I have the CComModule _Module; definition and the CInitInstance() code compiled as manages or as unmanaged code? ...more >>

How do I save a class's Raw Data (without .NET object data) to a binary file?
Posted by mpreisdorf NO[at]SPAM gmail.com at 6/27/2006 7:59:05 AM
I want to save the raw data of a class (without the .NET object overhead) to a binary file. For example: ref class Test { public: String^ name; Int32 number; ..... } I want to save the raw characters of the string and the raw integer without the additional .NET Object data. I am trying...more >>

How to get status of RTS, DTR & CTS lines of serial port
Posted by zing_foru at 6/27/2006 5:09:12 AM
Hi all I need to look the status of RTS, CTS, DTR lines of comport. I tried "IOCTL_SERIAL_GET_RSTDTR" flag but as a new to VC coding I doesn't know how to use this type of functions. I read MSDN and other info on Internet but failed to do the same. Can anybody explain me how to get the s...more >>

convert LPCSTR to LPCWSTR?
Posted by Neo at 6/26/2006 8:05:08 PM
how convert LPCSTR to LPCWSTR? regards, Mohammad Omer Nasir. ...more >>

Structure Alignment
Posted by Mike C# at 6/26/2006 1:50:56 PM
Hi all, I was having a discussion with a co-worker about alignment of structures in memory, and we came across a question. We have a struct like the following: struct Car { unsigned char VIN[17]; unsigned char Make[26]; unsigned char Model[26]; unsigned short Year; ...more >>

Open Files on Startup
Posted by Simon Brown at 6/26/2006 10:59:02 AM
Hi, I have noticed that in most proffesional applications, they detect which file the user has chosen to open a file with, and if it's that application, then the app detects what file the user has chosen and loads it. How can I add the feature to my App?...more >>

Compile with different versions of Visual Studio
Posted by cantatahost at 6/26/2006 9:18:02 AM
Hello, Likely this has been asked before... We have a library (in DLL form) that we distribute. The interface to the library is all C, but within the library it uses C++ in many places. Traditionally we've built our library with VC 6. We are considering moving to VS .NET 2003 or VS 2005...more >>

shockwaveFlash
Posted by Anuradha at 6/26/2006 12:00:00 AM
Dear Experts How can I insert a shockwaveFlash file to my web form I tried shockwaveFlash component but it is not working. I am using C# Thx Anuradha ...more >>

Resource Editor Bug
Posted by Larry Gillstrom at 6/24/2006 10:21:44 PM
Hi Our company is trying to migrate all of our products developed in msvc 6 to msvc 2005. Everything was going smoothly until we discovered that msvc 2005 will not save any changes we make in our resource (rc) files. And if we do make a change in the resource file, msvc 2005 crashes on exit...more >>

how do i use a 'string' like c#
Posted by Hareth at 6/24/2006 8:25:32 PM
string word = "cool"; in c# how do i do that in c++ i searched online and i was lost..... ...more >>

Conversion
Posted by hipek at 6/24/2006 1:28:57 PM
Hi, all, I don't know how to convert Char* to System::String* in Visual C++ 2005, I found something about conversion form other side (String* to Char*) but nothing about that. I need to put some text form Char* into textBox and I don't know how to do that. Thank for your hints. Hipek. ...more >>

cout
Posted by Durga at 6/24/2006 7:38:01 AM
Hi, What is lib file of cout & endl funtions? I included "iostream" also. Still I am getting this error. ERROR: C:\MyApp\console.cpp(10): error C2065: 'cout' : undeclared identifier -- Thanks & Regards, Durga....more >>

IBEnterpriseServer fatal error LNK1104: cannot open file 'libci.li
Posted by Durga at 6/24/2006 7:36:02 AM
HI, I am converting VC++ 6.0 to .NET 2003. But I am getting linker error. Error: MyApplication fatal error LNK1104: cannot open file 'libci.lib'. MyApplication has OpenSSL, MFC and win 32 console based application. How do I resolve this problem? Any Idea? Thanks & Rega...more >>

Are there something wrong with dragqueryfile or extracticon?
Posted by Kenny at 6/24/2006 12:00:00 AM
Hi,all! I am new to VC++.net. When I debug these code followed, It doesn't work.Could anyone tell me why? (This is an example in Programming Windows with MFC,Second Edition) void CShowIconDlg::OnDropFiles(HDROP hDropInfo) { int nCount = ::DragQueryFile(hDropInfo,(UINT)-1,NULL,0); if...more >>

PCH problem with VC8
Posted by Steve Dispensa at 6/23/2006 9:09:44 PM
I'm trying to set up multi-level precompiled headers, as described here: http://msdn2.microsoft.com/en-us/library/2yzw0wyd.aspx And I'm running into the problem described here: http://groups.google.com/group/microsoft.public.dotnet.languages.vc/browse_f rm/thread/8ee9970037fde00b/695bb61c3...more >>

Section attribute "K"?
Posted by Vincent Fatica at 6/23/2006 4:35:59 PM
The docs say: K Cacheable Marks the section as not cacheable and specify /SECTION:.text,!K and DUMPBIN will reveal section characteristics, including "Not Cached." There seems to be a contradiction. Does "K" mark the section as cacheable or not cacheable? -- - Vince...more >>

Extracting numerical value from text box
Posted by Ian Eagland at 6/23/2006 2:47:57 PM
Hi I am just starting on Visual C (2003) from a VB background. I find it easier to learn by actually programming. I have fallen over at the first hurdle. How do you extract a numerical value from a text box? I have a number of reference books but it is not mentioned because I guess it is si...more >>

_fileinfo and _set_fileinfo in VS 2005
Posted by cantatahost at 6/23/2006 11:24:01 AM
In older versions of Visual Studio, there was a global variable named _fileinfo and/or a function named _set_fileinfo. These seem to be gone in Visual Studio 2005. The documentation mentions them, but does not say what should be used instead. The purpose of these features was to control whe...more >>

CToolbarCtrl problem
Posted by CrimeMaster at 6/22/2006 11:56:46 PM
I have created a class derived from CToolbarCtrl. in this class i have added some push buttons and some dropdown buttons.In which one of them is setting button.when i click this button a property sheet is displayed in which i can select and deselect a lot of options about to display a specif but...more >>

Code outlining in Visual Studio2005
Posted by KK at 6/22/2006 12:29:15 PM
Dear All Recently I started using VisualStudio2005 for my C++ development.Earlier I was using 2003. I found difference between these two version in showing the code outlining. For example : In VS2003 MyClass:: Method(int x, int y ) // We can collapse here { if( x < y ) ...more >>

replace string in file
Posted by Stephanie Doherty at 6/22/2006 10:10:02 AM
Hello World, I am trying to replace a string in a large file without going through the process of reading every line to locate the string in question. Is there a function which will do this? I was looking into the FindReplace method of the Find object, but couldn't find an example showing a...more >>

BeginInvoke
Posted by dusanv NO[at]SPAM gmail.com at 6/21/2006 9:46:12 PM
Hi, I'm trying to call 'BeginInvoke' on a member function of the Form Class (Close function). What delegate do I use for that? Thanks. ...more >>

Unable to add an existing file to a project
Posted by rohinichandrap NO[at]SPAM gmail.com at 6/21/2006 12:07:31 PM
Hi, I have converted a workspace(A.dsw) from VC++ 6.0 to VC++ 7.1(A.sln). The solution A.sln has three projects in it B,C,D. My software configuration management is done in Rational clear case. Below is the hierarchy in my clearcase explorer. | |----jkl | |----abc |----...more >>

Can We Read Text data From an EXE
Posted by CrimeMaster at 6/21/2006 5:15:55 AM
HI I have an Exe file when it runs ,there are just two controls on the window.One is a ListBox and another is a Multi line Rich Edit control.When i click on an item in the list some text is displayed in the Edit control.Exe have a Hunderds of items in the List controls,which display some text ...more >>


DevelopmentNow Blog