visual-c++

Getting Doxygen and MSVC TODO tags to work together

In doxygen, the standard "/// \todo stuff" is used to tag a todo item. I do most of my coding in MSVC so it's handy to be able to see the TODO's in the Task List. MSVC uses "//TODO stuff" for their tags. Is there any way to make them work together? I found the properties pane for the Task list and try to add "\todo" to the list, but ...

how to fix the error c2118: negative subscript

Again, porting 32-bit app to 64-bit. I get the negative subscript error on the C_ASSERT statement mentioned below.. C_ASSERT (sizeof(somestruct) == some#define); I also read the http://support.microsoft.com/kb/68475 article but not sure if I know how to fix it in this case. Help is appreciated. Thanks in advance. ...

CEdit control MFC, placing cursor to end of string after SetWindowText

Hi, I am using VC9, I've a CEdit control whose contents are reset to default test (say - "fill-in") at the click of a button and then i call SetFocus for the CEdit control. The problem is that the cursor blinks at the start of the default text, and i want it to blink an the end of the default string. How can this be done? ...

vc++ file type won't go away

I uninstalled Visual C++ (on Windows XP), but my c++ source files still have the VCExpress.cpp.9.0 extension (when I right click a file and go to properties it shows that as the file type). How can I change it to what I had originally which was just the CPP type. Thanks ...

How to use double buffer in this case ?

Let's say i have three control A, B, C. They are all inherited from CDialog, A is a main dialog , A contains B, and B contains C. and each time i use mouse mouse drag C, B and C will move together. This is a image:http://img507.imageshack.us/img507/7039/31709956.jpg We know this will cause B and C to redraw themselves. and it might cau...

Activating an application as a child/popup of another application

Hello, Under Windows XP, is it possible to execute a 3rd party application, so its main window will be a child/popup window of my VC++ MFC application? I want to control it's Z-Order like any other window in my app I don't want it be be visible in the taskbar I want to catch its WM_CLOSE and handle it in my app In general, I want my ...

C++/CLI Managed Wrapper and ADODB::Recordset

I have a native C++ DLL that uses COM ADO Recordsets and am in need of converting it to the .NET variant (ADODB::Recordset). I have tried several approaches to tackling this problem without success. The native C++ DLL dynamically creates and populates the COM Recordset. Ideally I'd do the same for the ADODB::Recordset within the manage...

Program Restart

I have a Program which is written in C++. It is a program which needs to be restarted when network connection is lost ... I have written program code which is pinging IP and I'm stuck on that ... Can anybody show me the code for the next step Thank you beforehand. ...

Are the new and delete operators thread-safe in pthreads-w32 for visual c++?

Are the new and delete operators thread-safe in pthreads-w32 for visual c++? What things should I assume will always be thread-safe in pthreads-w32? ...

Deleting a method from Visual Studio properties window

The "Events", "Messages" and "Overrides" tabs in the Properties Window can be used to add new methods to a class as well as to remove them. However, when you select to "Delete" a method, it comments the method code instead of deleting it. I know this is for safety issues, but I almost never need the commented code and end up having to d...

Observing a custom matrix class's content in Visual Studio 2008 debugger

Hi everyone, I'm trying to display the information from a custom matrix class in Visual Studio 2008's debugger by enhancing/modifying the file autoexp.dat. The custom class goes as follow : LVSN::Matrix<T> { ... functions ... struct base_mat { T **Val; size_t Row, Col, RowSiz, ColSiz; int Refcnt; T Err; ...

Setting the internal buffer used by a standard stream (pubsetbuf)

I'm writing a subroutine that needs to write data to an existing buffer, and I would like to use the stringstream class to facilitate the formatting of the data. Initially, I used the following code to copy the contents of the stream into the buffer, but would like to avoid this solution as it copies too much data. #include <sstream> #...

Default template parameters arguments in VC++

Does VC++ not support default template parameters arguments? This simple code: template <typename T=int> class X { }; X x; gives me an 'error C2955: 'X' : use of class template requires template argument list'. No complaints about the template declaration, however. What am I missing here? Some compiler switch maybe? ...

stepping into MACRO in VC++

I am debugging a source code that has a lot of big #define'd MACRO routines. I am interesting in stepping into them, but I guess, VC++ does not allow step-in functionality ... so, I am converting them into functions, but this is becoming hard for me Is there a way to step into MACRO routines? especially in VC++? PS: I can port the w...

how can i get get the MACaddress of all the NICs on my PC using WMI

HI all, I am trying to modify the code provided by MS try to access the the Network Adapter Configuration I am getting null pointer exception in it when i try to access the Mac Address or IPAddress property im using VC++ 2005. check for the // exception here: vtProp is returned as NULL line where am getting the exception. #define _W...

IHTMLDocument2Ptr giving compilation error.

Hi, I am trying to compile one of old project in Visual Studio 2003 on Vista. This project is compiling like a charm on other machine even with Vista(and also with XP) but on my machine. I've checked all settings and include paths but all seems correct. One thing I observed unique on my machine is when I try to find reference of IHTMLD...

Creating SOAP web service for VC++ dll

I have been using a VC++ dll in a Dialog based application so far. Now, I am trying to provide the dll as a web service without re-writing or migrating the code. I was researching on various ways to set up the web service, I have setup the web service using C++ cgi in IIS. But it sounds like old way of doing things. My second option...

msflexgrid Unicode

I have an old project that I am trying to Unicode enable. I am trying to put Unicode data into an msflexgrid, but it comes out as question marks. Is there some trick to getting MSFlexGrid to work with Unicode data? Will it work at all? If not, is there a good OCX replacement that I could use? ...

Visual Studio 2008 oddity with C++ and header files

Hi all, I have a large C++ project within a Visual Studio 2008 solution file, and everything is compiling and building correctly. So far so good. However, it is unable to find any header files when I attempt to open them directly from the IDE's code viewer window, even though the folder locations of those header files are enumerated in...

Visual C++ declaring a string array

I am working in Visual C++. I'm giving following command String nodename[100]; but this command is giving the following error "error : 'System::String' : a native array cannot contain this managed type" So what should I do now ? ...