visual-c++

How to mark a list control item as selected?

In a Win32 application I have a dialog with a list control which is defined is the dialog template: CONTROL "",IDC_LIST_Attributes,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,36,246,110 In the runtime I retrieve the handle to that control and perform different operations with it - remove ...

How to find whether the .NET installed or not in the System by using c++??

Hi Is there any API available to find the whether the .NET framework installed or not in the system. or atlest can any one give me idea how to do this our own in c++ and also how to find the path where .NET installed if it is installed?? How can i do this ... Any Help in this regard will Be Appreciated Greately..... ...

How to Use GetCORSystemDirectory()?

HANDLE Proc; HMODULE hDLL; hDLL = LoadLibrary(TEXT("mscoree.dll")); if(hDLL == NULL) cout << "No Dll with Specified Name" << endl; else { cout << "DLL Handle" << hDLL << endl<<endl; cout << "Getting the process address..." << endl; Proc = GetProcAddress(hDLL,"GetRequestedRuntimeVersion"); if(Proc == NULL) { FreeLibrary(hDLL)...

Integrating GUI into console applications

Hi, I have two independent console applications developed in C++. I was asked to develop a GUI for both of them. In this GUI I collect some parameters that are needed to launch any of these applications. Anyone can give some orientation on integrating the console applications with this GUI? Could it be possible to launch the application...

How to Create a process in c++ to execute exe?

Hi I have to excecute a exe which is available in some drive how can i do this using c++?? I am doing like this #include <stdio.h> #include <conio.h> #include <windows.h> void main() { STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); i...

Bad pointer or link issue when creating wstring from vc6 dll

I got a DLL generated on VC6 and using wstring, and I'm trying to use it in a VC9 project. In this DLL there is a higher level class manipulating wstring, called UtfString. I got everything imported correctly in my project, but when I call: std::wstring test; UtfString uTest(test); it won't link, even if the function prototype is in...

Is it possible to instruct MSVC to use release version of Boost when compiling Debug project?

I have built Boost in Release configuration and have staged it into one folder. Now when I add Boost libraries into project and try to build it in Debug configuration - linker fails because there are no Debug versions libraries. Is there a way to make MSVC 9.0 use Release version of libraries when building Debug configuration? Of cours...

checkbox select and deselect

I am using VC++ 6.0 with MFC. I have three Check Boxes(IDC_CHECK1,IDC_CHECK2 and IDC_CHECK3). If Select IDC_CHECK1 then all two IDC_CHECK2 and IDC_CHECK3 has to select, if i delect the IDC_CHECK1 then all two IDC_CHECK2 and IDC_CHECK3 must deselect. so i am trying but i am not getting . please any body give the solution.how to do? ...

How to do type conversion for the following Scenario??

Hi I am using TCHAR buffer[MAX_SIZE]; after some set of steps i am gettig the relative path of folder say for ex: c:\Microsoft.NET\Framework\v1.0.037\ Since the above path is in buffer of type TCHAR and i am trying to concatenate"RegAsm.exe" After Appending i need to convert the path to the LPCTSTR since i need to pass it to Crea...

MSVC++ how to ouput something to the "output"-window during compilation

hello, sometimes i see that certain projects write something to the output during compilation. how can that be achieved in MSVC++ thanks! ...

How to pass the Directory path as command line for the process??

Hi iam using regasm.exe to generate tlb file and register the assembly programatically.But the path of tlb in .NET root directory itself. so do like this buffer contains c:\windows\Microsoft.Net\framework\v2.0.57\RegAsm.exe if(!CreateProcessW(buffer,L" C:\Program Files\Test\Test.dll /codebase /tlb /silent" ,NULL, NULL,FALSE, 0,NULL,...

How to compile open source framework in Visual Studio C++, that has "makefile" only and no solution file?

How to compile open source framework in Visual Studio C++, that has "makefile" only and no solution file? ...

Deterministic builds under Windows

The ultimate goal is comparing 2 binaries built from exact same source in exact same environment and being able to tell that they indeed are functionally equivalent. One application for this would be focusing QA time on things that were actually changed between releases, as well as change monitoring in general. MSVC in tandem with PE ...

How to increase a cells height and width in ListControl

How can we increase the the height and width of a cell in List It is created using Listcontrol MFC ...

MongoDB and visual C++ 2008 linker errors

i'm trying to get the c++ client for mongodb working in visual studio 2008. i can reference the includes, but whenever i tell the linker about the mongodb .lib file i get the following error: "fatal error LNK1257: code generation failed". if visual studio can't find the .lib, then i get a bunch of unresolved externals errors. i'm really ...

Problem in hosting ActiveX on Vista (in a Visual Studio 6 C++ application)

Hello everyone, I just installed Visual Studio 6 (SP5) on a Vista Enterprise machine. Had some problems but I think it’s set up alright. The problem is my VC++ 6 application fails when trying to host an ActiveX. I was able to compile it ok, though got a warning message from Vista about the rc.exe (“This program has known compatibility ...

Execute a process and return its standard output in VC++

What's the easiest way to execute a process, wait for it to finish, and then return its standard output as a string? Kinda like backtics in Perl. Not looking for a cross platform thing. I just need the quickest solution for VC++. Any ideas? ...

Browser keep stopping with user breakpoint and opens visual studio 6 in debug mode

Hi, Following my last question (see: http://stackoverflow.com/questions/1184175/problem-in-hosting-activex-on-vista-in-a-visual-studio-6-c-application) I ran into a strange problem. I hope this’ll be a simpler issue to the experts here: Each time I run certain application like iexplorer or firefox, the Visual Studio 6 suddenly opens up...

"Build Solution" not working in Visual C++ anymore

I'm working on a personal project in Visual C++ 2008 and for some reason "Build Solution" doesn't work anymore...the code changes aren't registered unless I use "Rebuild Solution". Any ideas as to why this is happening? I've tried google, but found nothing useful... ...

How to detect when an exception is in flight?

In C++ (MSVC) how can I test whether an exception is currently "in flight". Ie, code which is being called as part of a class destructor may be getting invoked because an exception is unwinding the stack.. How can I detect this case as opposed to the normal case of a destructor being called due to a normal return? ...