visual-c++

By knowing VC++ MFC, how easy or difficult is to learn C#.Net?

Right now, I'm more into design & maintenance of MFC based application. I'm seeing good progress and requirement for C#.Net application. With this background knowledge, how easy or difficult is to learn C#.Net? Is there any tutorials available online that helps MFC developers to easily learn C#.Net quickly? Any help on this much apprec...

RC2135 file not found error

Hi, I manually added code fro a new dialog box in my .rc file and I have started getting this error. error RC2135: file not found: 0 I don't understand this error as it is not specifying any filename. Any help is appreciated. Thanks, SG ...

How to get the dimensions of an Icon from its handle?

I have a handle to the icon (HICON) and have to find out the dimensions of the icon that it represents. How do I get this information? ...

Custom Template Iterator Reference

Hi, Can any one recommend a good resource to refer on writing C++ custom template iterators?? Thank You! ...

Setting Environment Variables For NMAKE Before Building A 'Makefile Solution'

I have an MSVC Makefile Project in which I need to set an environment variable before running NMAKE. For x64 builds I needs to set it to one value, and for x86 builds I need to set it to something else. So for example, when doing a build I would want to SET PLATFORM=win64 if I'm building a 64-bit compile, or SET PLATFORM=win32 if I'm b...

DUMP in unhandled C++ exception

In MSVC, how can I make any unhandled C++ exception (std::runtime_error, for instance) crash my release-compiled program so that it generates a dump with the full stack from the exception throw location? I have installed NTSD in the AeDebug registry and can generate good dumps for things like memory access violation, so the matter here ...

VC++ 2010 wants to link boost libararies i didn't even specify

Hi there, I'm trying to build my application with MSVC 2010 instead of GCC. With GCC everything works fine. My app uses boost_system and boost_thread libraries. I built boost with VC2010 in "system" layout, that means the libraries are named just libboost_system.lib (and not libboost_system_compiler_threading_version_wtf_snafu.lib) The...

how can we avoid allocation done by Marshal::StringToHGlobalAnsi?

my wrapper from managed to unmanaged is handling a lot of data and this function Marshal::StringToHGlobalAnsi would call new for each of them, which is a big hit for me. So my question is : can I allocate a chunk of unmanaged memory and use it to convert the managed data types to unmanaged by hand. ...

Inline assembler get address of pointer Visual Studio

I have a function in VS where I pass a pointer to the function. I then want to store the pointer in a register to further manipulate. How do you do that? I have tried float __declspec(align(16)) x[16] = { 0.125000, 0.125000, 0.125000, 0, -0.125000, 0.125000, -0.125000, 0, 0.125000, -0.125000, -0.125000, 0, -0.125000, -...

understanding the anatomy of file formats and image formats

I am trying to do some research on file formats especially image formats. Information such as header layouts for particular types of image formats and how to parse them using C++. If anyone can point me in the right direction of some good tutorials or books. that would be helpful. thanks [edit] If there are any resources on the general ...

MSVC win32: convert extended precision float (80-bit) to double (64-bit)

What is the most portable and "right" way to do conversion from extended precision float (80-bit value, also known as "long double" in some compilers) to double (64-bit) in MSVC win32/win64? MSVC currently (as of 2010) assumes that "long double" is "double" synonym. I could probably write fld/fstp assembler pair in inline asm, but inli...

Does Sendmessage can really change button state at run time?

Is it true, that by using Sendmessage and the Toolbar control messages, I can change the state (or anything) of a custom made IE7 toolbar button at run time? The reason I'm asking is, I have been trying this thing for weeks now, still can found a solution. So far, I manage to only change the button's state at link time (means when I exe...

what compiler supports multi programming language?

i know it sounds crazy but, i just want to ask if is a compiler support multi programming language? like Delphi could also support C/C++/C# etc? if there is, please let me know. or how? ...

Where do I input DLL dependencies in Visual Studio C++ project?

Easy points for someone with Visual Studio C++ experience: I am converting some Qt project files (.pro) that run on Linux and Mac into Visual Studio project files (.vcproj) The Qt Visual Studio add-in converted everything fine except the DLL dependencies. Where do I put these in Visual Studio 2008? If I put the DLLs in Configuration P...

Visual C++: Invalid allocation size. How to force the debugger to stop on this message?

The MFC program I am debugging is printing this message in the "Output" window in Visual Studio 9.0: HEAP[AppName.exe]: Invalid allocation size - 99999998 (exceeded 7ffdefff) I'm pretty sure this is due to a bad "new", uninitialized variable or similar error. The question is: how do I get the debugger to stop on this message so that ...

better understanding of extern "C" functions

I am just trying to further understand extern C functions. According to my knowledge, an extern C function is always a function you are trying call from an application that has already been compiled. Either a executable, static or dynamic library. extern "C" { HRESULT CreateDevice(); typedef HRESULT (*CREATEDEVICE)(); HRESU...

Command Line argument option not working on Visual C++ 2008

Hello, I am trying to pass command line parameters in Debug mode in one VC++ 2008 solution as described here Debugging with command-line parameters in Visual Studio. The thing is that somehow actually VC++ is not passing the parameteres because I always get 1 for "argc" variable. Is anything else that should be enabled or what could pre...

How to get a nice view of data structure in debugger?

I am debugging a Visual C++ project that uses Rogue Wave a lot. I would like to see content of RW containers easily, i.e. i want to see list elements instead of this: What are my options? Can autoexp.dat do this? ...

Convert C++/MFC from visual studio.net 2002 to visual studio 2010

We will convert a number of programs written in C++ and MFC in Visual Studio.NET 2002 to Visual Studio 2010. What problems can we expect to encounter? What changes are there in the libraries that are worth knowing? ...

Add Visual C++ property sheets using CMake

I'm currently porting a gcc project to Visual C++. It's defined in a CMake file, and I have created a Visual C++ property sheet to aid in compatibility (GccCompat.props). Everytime the Visual C++ project files are regenerated by CMake, the property sheet has to be added manually, since I don't know how to add it automatically. So, the qu...