visual-c++

With Visual C++ Express 2008, the LIB environment variable is being ignored.

We are using LDRA to unit test our source code. In our case LDRA is using cl.exe and link.exe from VC++ express 2008, on several machines setting the LIB environment variable allows link.exe to find the libraries we specify, some machines ignore the LIB environment variable. Does anyone know what would cause the LIB environment variable ...

Running Geant4 on Win32 system; build errors in VC++

I have Geant4 set-up to run on my Win32 system and have been using cygwin (Linux-like shell) to build the exe files. I figure that VC++ should also be able to build the exe files but I keep getting errors when I only use VC++ to do the project build. After I add all the header files as part of a project, I still can't get it to build. E...

Can I compile using VS2008's C++ compiler using VS2010 and only the Server 2008 Platform SDK?

I'd rather not install the entire VS 2008 installation given that I'm not going to be using anything other than the compiler. Will VS 2010's multitargeting work correctly using only the Platform SDK instead of the full VS2008 install? ...

reason for one or more multiply defined symbols found error?

here is my code: why does the error "one or more multiply defined symbols found?" #include <stdio.h> #include "person.h" void main() { FILE* census; int status; int data_read; person student[10]; census = fopen("mycensus.dat","r"); if (census == NULL) { printf("File not opened!"); } else{ data...

How to read MS Word documents using MFC?

I'm working on a project using VC++/MFC and I need to read data from Word documents. I've Googled, but can't find any viable solutions. How can I get started in this MFC? Any help would be appreciated! UPDATE: Information I can find on the MS support site and Google is really out-of-date, and I need work with on Word 2003 or 2007. ...

ShowWindow()...mfc

I am calling one dialog box from another.....before calling 2nd dialog box i am hiding the 1st dialog box using ShowWindow(SW_HIDE) and after finishing the operation on 2nd dialog box i destroy it....now when the control comes back to the function i am using ShowWindow(SW_SHOW) to show the 1st dialog again but it remains hidden..can anyb...

Visual C++: Dialog editor has forgotten what class is linked to the dialog template

I created a dialog and then created a class linked to it using the wizard. Somehow VC++ has forgotten this and now wants me to create a class whenever I double-click on a control in the editor to create a handler. Are these mappings stored in a file I can edit, or does VC++ try to deduce this and I'm stuck with it? ...

MFC Application in VC++

I have developed a desktop application using MFC, which has FILE, EDIT, VIEW and HELP options,along with one pen to write on the opened document which saves as test1. It is allowing me to open only test1 or test2 etc. Apart from these types of files, if i want to open PPTs or PDFs how can i do it? The code to open a file is autogenera...

Why sometimes the call stack in a dump file does not looks correct?

Recently We have a production issue with application freezed, we tried to break in and analyse the dump file, unfortunately the call stack for the dump file does not looks good and hard to track down the cause of the freeze. ...

saying error unresolved external symbol _mainCRTstartup ??

why do i keep getting this error "unresolved external symbol _mainCRTstartup"? #include <stdio.h> typedef enum race_location { NEW_ORLEANS, WASHINGTON_DC, ST_LOUIS, LOS_ANGELES, CHICAGO } race_location; ...

copy a whole application to new application visual C++ MFC/Smart Device?

Hi, I am using Visual studio 2005 for my development. I am doing a smart device application using Visual C++ MFC. I had an application runnning perfectly on a device with ARMV4, till recently we receive a new Device with ARMV4I. the application is running on the new device but some features are not working, mainly serial port communi...

How to get the Windows NT version of any system in c++

How to get the Windows NT version of any system in c++ ...

Does VC++ support _mm_malloc ?

Does Visual Studio C++ 2008/2010 support _mm_malloc officially? It is defined in malloc.h but I can't find its description in the MSDN library. ...

Virtual List Control Problem

Hi, I'm using a virtual lit control and I get the data from a map. My problem is when I run the code, it displays the list ok, but when the mouse cursor moves on to the list control or when I try to scroll down, it gives a Debug Assertion failure saying map/set iterator is not dereferencable. My GetDispInfo() method is as follows: voi...

How is MFC app commiting to virtual memory?

I am working on an MFC app that seems to be automagically committing to ~160MB of virtual memory. The app typically runs at 10-14MB of memory usage so this level of committed memory seems excessive. Additionally there is no where in the code where VirtualAlloc is called... COM & ATL are also being used. The memory shows as committed t...

Export function from a DLL - Use DEF file or dllexport?

Module-definition (.def) files provide the linker with information about exports, attributes, and other information about the program to be linked. A .def file is most useful when building a DLL. Because there are linker options that can be used instead of module-definition statements, .def files are generally not ne...

CORBA exception causes an orphan iterator error, why would omniorb CORBA interfere with VC++ 2008 CRT?

We have a function that, when tested using MS VC++ 2008 using omniorb CORBA libraries causes an orphaned iterator error. If we recompile all of our source using the _HAS_ITERATOR_DEBUGGING=0, the error goes away. I cannot paste the exact code, but here is a facsimile: void funtion(CORBA::ANY& blah) { sometype::iterator itr; try...

Windows 7 : Subauthentication Package

Hi all, I have this problem, I was trying to create a subauthentication package for windows 7. But no samples are available. Can someone please help. Sid ...

When a window closes, do my destructors get called?

If a window is closed (like with sending WM_CLOSE), are the destructors of objects called? I followed my source code with a break point in that situation, but the compiler doesn't seem to pass through my destructor. Is the program closed without calling any destructors? ...

How to implement text-to-speech (TTS) in Visual C#/C++?

I want to write a simple Windows app in Visual C#/C++ that lets users input different segments of text, and then press a set of hotkeys to hear the various text segments in TTS at any time. The program should accept hotkeys while running in background or even when fullscreen applications have focus. Example use case: user enters "hello ...