visual-c++

VS 2005 & 2008 library linking

Is it correct to link a static library (.lib) compiled with VS 2005 with a program which is compiled with VS 2008? Both library and my program are written in C++. This program is run on Windows Mobile 6 Professional emulator. This seems to work, there are no linking errors. However the program crashes during startup because strange thin...

Why the option to use attributes in new ATL projects was removed from Visual Studio 2008?

This is the text from MSDN comment: "According to the book ATL Internals (2ed) the use of attributes is deprecated and should not be used in new ATL projects." But WHY?!! ...

VC++ and MapPoint OCX problem

Hello I am writing a VC++ MFC dialog based app which requires Microsoft MapPoint embedding in it. To do this I'm using MS VC++ .NET 2003 and MapPoint Europe 2006 to do this but am having problems as when I select "Insert ActiveX Control" no MapPoint control appears in the list of options. I have tried manually registering mappointcontro...

Looking for experiences working with Qt

I had an idea for a plug-in for my favorite program runner Launchy, however after downloading the source code I found that it makes heavy use of the Qt library. The bulk of my experience is in C# and PHP and until that moment I had never really even heard of this library. Which leads me to ask, does anyone have any impressions of it ...

Regex's For Developers

I've been trying to figure out a regex to allow me to search for a particular string while automatically skipping comments. Anyone have an RE like this or know of one? It doesn't even need to be sophisticated enough to skip #if 0 blocks; I just want it to skip over // and /* blocks. The converse, that is only search inside comment blo...

Reading VC++ CArchive Binary Format (or Java reading (CObArray))

Is there any clear documentation on the binary formats used to serialize the various MFC data structures? I've been able to view some of my own classes in a hex editor and use Java's ByteBuffer class to read them in (with automatic endianness conversions, etc). However, I am currently running into issues while trying to bring over the ...

Creating Custom Performance Counters in Visual C++

Does anybody know of a method for creating custom Performance Counters using ordinary unmanaged Visual C++? I know that it can be done easily using managed C++, but I need to do it using an unmanaged Windows service. I also know that you can retrieve performance counter data, but I need to create some custom counters and increment them d...

What is the difference between dllexport and dllimport?

I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here. ...

How to replace WinAPI functions calls in the MS VC++ project with my own implementation (name and parametrs set are the same)?

I need to replace all WinAPI calls of the CreateFile, ReadFile, SetFilePointer, CloseHandle with my own implementation (which use low-level file reading via Bluetooth). The code, where functions will be replaced, is Video File Player and it already works with the regular hdd files. It is also needed, that Video Player still can p...

C++ Exception code lookup

Knowing an exception code, is there a way to find out more about what the actual exception that was thrown means? My exception in question: 0x64487347 Exception address: 0x1 The call stack shows no information. I'm reviewing a .dmp of a crash and not actually debugging in Visual Studio. ...

Using GCC from within VS 2005(8) IDE

Is there a way to utilise the GCC compiler whilst still being able to develop via the Visual Studio IDE? Our project is cross-platform, and I quite frequently get into trouble from my colleague because I'm checking in code that's not standards compliant (this can be attributed to the VS compiler!). I'd still like to be able to compil...

How do you make an infinite scrollbar control with Windows Core API?

How do I make one? I am kind of a newbie in Windows API. Is there some sort of manual for this sort of thing? I am specifically interested in a Core API. Thank you for any help. ...

How do you reliably get the Quick Launch folder in XP and Vista?

We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question. For reference, here is code to get the Application Data folder under both systems: HRESULT hres; CString basePath; hres = SHGetSpecialFolderPath...

Compile-time LCM / GCD in C

Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in C (not C++, I know that template magic is available there)? I generally use GCC and recall that it can calculate certain values at compile-time when all inputs are known (ex: sin, c...

Mixing C# Code and umanaged C++ code on Windows with Visual Studio.

I would like to call my unmanaged C++ libraries from my C# code. What are the potential pitfalls and precautions that need to be taken? Thank you for your time. ...

Chart controls for MFC application?

I would like to have some suggestions about which third-part controls can we use in our Visual C++ MFC application? ...

Code/Document Management for a very small company

I work for a very small company (~5 employees, 2.5 coders). We have gotten away with no code or document management for several years, but it's starting to catch up with us as we grow a bit. Any suggestions for a management system. Free is better, but cheap is acceptable. We just don't want to spend more time on installation/configur...

How to compile Cairo for Visual C++ 2008 (Express edition)

Most precompiled Windows binaries are made with the MSYS+gcc toolchain. It uses MSVCRT runtime, which is incompatible with Visual C++ 2005/2008. So, how to go about and compile Cairo 1.6.4 (or later) for Visual C++ only. Including dependencies (png,zlib,pixman). ...

linking HTMLHelp.lib with x64

i have a VS05 C++ (MFC) project which uses HtmlHelp (function HTMLHelpA, linked from HmleHelp.lib, which came from HTML HElp Workshop v1.4). the 32-bit version compiles and links fine. the 64-bit version compiles fine, but gets an "unresolved external" error on HTMLHelpA, when linking. so, my question is simple: is there a way to use ...

Screen capture doesn't work on MFC application in Vista

We've got some in-house applications built in MFC, with OpenGL drawing routines. They all use the same code to draw on the screen and either print the screen or save it to a JPEG file. Everything's been working fine in Windows XP, and I need to find a way to make them work on Vista. In three of our applications, everything works. In ...