visual-c++

how to convert vb6 to visual c++ native code?

We have a client who wants to convert a bunch of VB6 projects in to VC++ native code. I would like to know if there are any tools available for such conversion. We tried http://vbto.net/, which converts, but generates tons of compile errors. The tool creates all cpp projects as "exe", while many of the source VB6 projects are "activex d...

Adding AES encryption to VC++ application

Hi, I created a GUI application in VC++ and now I wanted to do a AES128 encryption to the data, I am writting to it. Can anyone please let me know how can I do that in VC++. ...

How to make a dialog as same size as another dialog in MFC?

I am in process of creating a dialog IDD_DIALOG2 which i want to be in the same size as existing dialog IDD_DIALOG1, what would be the easiest way to do this in VC++? ...

Which Visual C++ file types should be committed to version control?

Which Visual Studio \ Visual C++ file types should be committed to version control? In my project I have the following file types: aps cpp exe filters h ico idb ipch lastbuildstate lib log manifest obj pch pdb rc rc2 res sdf sln tlog txt user vcxproj I would greatly appreciate a short reasoning for each. If any of them are controversi...

What is the best practice in C++ to declare objects within classes?

Hi All, I'm working on a class library in VC++ that shall have ref classes and some native code. Now, I need to use five native objects from an external framework. those objects must be declared on the heap NOT on the stack. I want encapsulate those objects in some sort of a structure knowing that constructors need to be called. Thank ...

CSpinButtonCtrl drawing problem with small CEdit control

Hi, I'm trying to draw a CSpinButtonCtrl as a buddy of an edit box in Windows 7. When my CEdit window is 12 dialog units high, the spin buttons are scaled really badly and the top border is clipped off. This looks pretty ugly. How can I get around this, or must I restrict my CEdit controls to be 14 dialog units high? My controls are...

cvblob compile error in Visual C++ 6.0

Hi all! I'm using Microsoft Visual C++ 6.0 and Microsoft Visual Studio 2008 to develop an academic computer vision project. In this project i need to use OpenCV 1.1 (http://opencv.willowgarage.com/) and CvBlob (http://code.google.com/p/cvblob/). I tried to compile this project with Microsoft Visual Studio 2008 and it compiles without...

Can MSVC _penter and _pexit hooks be disabled on a per function basis ?

There are compiler options in MSVC to enable the automatic generation of instrumentation calls on entering and exiting functions. These hooks are called _penter() and _pexit(). The options to the compiler are: /Gh Enable _penter Hook Function /GH Enable _pexit Hook Function Is there a pragma or some sort of function ...

Looking for fast C++ graphic's lib. and compatible GUI lib

Hi everyone! I looking for FAST library (the best with hardware acceleration) for manipulation on 2D graphic (load image, change value of pixels, change all R/G/B layer from one image to another, save, show effects). I work with Visual Studio 2008/2010 IDE, and programing in C++ so I need lib worked with that. I have experience with SD...

Visual Studio environment alternative

I use Visual C++ (7.1 and 8.0) on huge C++ project. The solution contains thousands of files. Visual Assist helps in jumping to function and class definitions. The problem is that it sometimes becomes too slow. I just can't edit a single letter without delay. Is there some alternative to this environment? I mean something that may read ...

Is there a decompiler that will work on Visual Studio 6 C++

I have a project that I am trying to fix from a guy that left (let go) from my company. He has violated every fundamental principle of software engineering, not using source control, not backing up the source before you make more changes, etc. etc. I need to make changes to an application that is in the field and I don't have the origi...

VC++ 2010 exclude library

A project I'm building is attempting to include a library, but for the life of me I can't find out the call to include it is coming from. It's trying to include atlthunk.lib, which is supposed to be included through a #pragma comment in atlbase.h, but there's no such comment in my atlbase.h. I read about someone else who had this proble...

#include <Header.h> is not compiling while #include "Header.h" is compiling

Don't understand why #include <Header.h> is not compiling while #include "Header.h" is compiling with Visual Studio 2008. Am I missing something? ...

optimization of access to members in c++

I'm running into an inconsistent optimization behavior with different compilers for the following code: class tester { public: tester(int* arr_, int sz_) : arr(arr_), sz(sz_) {} int doadd() { sm = 0; for (int n = 0; n < 1000; ++n) { for (int i = 0; i < sz; ++i) { ...

Value initialization and Non POD types

An hour ago I posted an answer here which according to me was correct. However my answer was downvoted by Martin B. He said You're just lucky and are getting zeros because the memory that i was placed in happened to be zero-initialized. This is not guaranteed by the standard. However after reading Michael Burr's answer here and try...

Convolution Doesn't Seem to be correct?

Dear All, The convolution method below doesn't seem to be correct. Notice any error here? bool convolve2D(double* in, double* out, int dataSizeX, int dataSizeY, double* kernel, int kernelSizeX, int kernelSizeY) { int i, j, m, n; double *inPtr, *inPtr2, *outPtr, *kPtr; int kCenterX, kCenterY; int rowMin, rowMax; ...

How to draw like this in CView

How to implement the list appearance which showed in the image in a CView ...

Immediate call/jmp in Visual C inline assembler

When I try to make an immediate call or jump in VC++ 2010 inline assembler _asm { call 00405B90h; jmp 00405B90h; jmp far 00405B90h; } it generates an error C2415: improper operand type Is it possbile and how to do this? So far I have a work around: _asm { push 00405B90h; // This is a jump work around call 0...

The right way to load WDK in MS Visual C++ 2008?

Hi I have a project that includes a device driver and the developer is able to compile it. I installed MS Visual C++ 2008 and the first error was "fatal error C1083: Cannot open include file: 'ntddk.h': No such file or directory". I downloaded the WDK from Microsoft website and installed it, I also executed Start -> All Programs -> Wind...

scope of variable outside for loop

Hello, I'm trying to use a program written a few years ago and compiled in a previous version of MS VC++ (I am using VC++ 2008). There are a lot (hundreds) of instances similar to the following: int main () { int number = 0; int number2 = 0; for (int i = 0; i<10; i++) { //something using i } for (i=0; i<10; i++) { //s...