visual-c++

Visual C++ Enable Console

I created an Empty Project in Visual C++, but now I need the Console to display debug output. How can I enable the Console without recreating the project or show the output in the VS output window? Thanks in advance Attic ...

compile notepad2 under visual studio 2008

I tried to compile notepad2 4.1.24 http://www.flos-freeware.ch/notepad2.html but got a lot of message error. I downloaded scintilla v 2.03 http://www.scintilla.org/ScintillaDownload.html and replaced #define LINK_LEXER(lexer) extern LexerModule lexer; by #define LINK_LEXER(lexer) void(0) but got a bunch of errors. Did someone alr...

Dll execute during MSI execution(Installer)

I created an MSI for my application and i want my dll to execute during installation of this MSI. How can i add my dll to MSI. I read something on ORCA but getting error. Can anyone help to add my dll to msi using orca. My dll contain a message box and registry entry ...

Set system time into registry

i want to create a new registry entry and set current system time into registry. How can i implement it using C++ ...

How to add a specific method to a particular scope in Visual Studion 2005

Hi, In my visual studio project (C++), when i copy a method(meth1) of a particular scope say 'scope1' and paste it in the same code area, it is getting pasted in General Scope. i.e I want to add a method into a particular scope but when i try it is getting added in general scope. How can i solve this? For eg: There is an existing metho...

How to set system time, day and year in registry

i created new registry entry using RegCreateKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\XXXXXX\Test"), 0, NULL, 0, 0, NULL, &hkey, &dwDisposition) Now i want to save current system time data and year to the newly created registry for later retrival How can i implement it in VC++ using RegSetKeyValue. I tried but faile dto implement. ...

How to install X library for use with VC++?

Hi, i have uptill now worked on linux where its very easy to install opensource libraries using simple configure;make;make install commands.. now i need to use MSVC++ to run some opengl code that includes the standard opengl headers.. but defaultly they arent present.. i downloaded the tar file from freeglut site,it has VisualStudio20...

Unkillable console windows

I'm developing an OpenGL based 2d simulation with GLUT under Visual C++ 2008, sometimes when I have an assert() or unhandled exception and break into the debugger, the GLUT display window closes, but the console window remains open.They just cant be killed!!! They do not show up with Task manager, Process Explorer or any other tool, I c...

Exception while opening file

Hi I have a VC++ application and in my application i have some basic file operations. Below is the defaulting code CStdioFile cFile; CFileException e; CString sReport; CString sHtmlfile = "testreport.html" OutputDebugString((sHtmlfile)); if (!cFile.Open(sHtmlfile,CFile::modeCreate | CFile::modeWrite, &e )) { } The problem is my app...

how to load driver?

Hi, I want to develop one driver so i have create one service and one .sys file for driver to be display now i do not know how to attach that two file or how to register my driver to windows. so just tell me the step which i should follow. Thanks and hoping for positive response. ...

C++ linking issue on Visual Studio 2008 when crosslinking different projects on same solution

I'm using Google Test Framework to set some unit tests. I have got three projects in my solution: FN (my project) FN_test (my tests) gtest (Google Test Framework) I set FN_test to have FN and gtest as references (dependencies), and then I think I'm ready to set up my tests (I've already set everyone to /MTd (not doing this was leadi...

how to set mediatype for prreview pin vc++ directshow

hai.. am writing simple appliaction for capture and rendering video in vc++ .and i set meadiatype for capture pin RGB24 AND 640*480 image size. Image is captured thats size.but i cant rendering preview.if i render that i get BLACk PREVIEW only.i checked also in GRAPH EDIT tool.but i cant get. am using wcsa400 card type cam and .net 20...

Visual Studio 2008 C++ Writing to a dialog during OnInit or at startup

Ok, If I cannot write on a dialog during oninit by: You can't use the function SSTextOut() in OnInitDialog(). OnInitDialog() is called before your dialog is displayed, so you can't get a valid CDC inside of it (because the dialog hasn't been drawn yet). From the looks of it, SSTextOut() is meant to be called from an OnPaint() overrid...

string to integer type in visual c++

i make a textbox,enter some data, store it into string format,there are some values as numbers,can i change these string numbers into integer format the problrm is for visual c++ in visual studio in the windows form ...

LockWorkStation - Compilation error - identifier not found

Hi All, I am writing an application in which I got to lock the computer screen (OS is Windows). My Application is in C++. For this purpose I used the LockWorkStation() API defined on msdn, http://msdn.microsoft.com/en-us/library/aa376875%28VS.85%29.aspx I have included windows.h as told but still I am getting compilation error: .\sour...

VC6 linking conflict

I have an old c++ project compiled with VC6. I need to statically link a new library to implement a new functionality. Unfortunately the new library define a symbol (i.e. _inflate) that is already defined in a previously linked static library. Of course I cannot get rid of either library, and of course I have no access to the library'...

How to monitor a directory for files in C++?

I need to monitor a directory which contains many files and a process reads and deletes the .txt files from the directory; once all the .txt files are consumed, the consuming process needs to be killed. How do I check if all the .txt files are consumed using C++? I am developing my application on Visual Studio on windows platform. ...

hEvent member in OVERLAPPED Win32 structure

When asynchronous I/O (or "overlapped" I/O in Win32 jargon) is used, we need to deal with the OVERLAPPED structure and his hEvent member. If the I/O function will delay the read or write operation, we will get an ERROR_IO_PENDING error code, then we will wait the asynchronous operation to complete with a WaitForXxxEvent function, then we...

How to access GMT time using VC

In my project i am using GetLocalTime() and GetSystemTime and set the current time into registry. But my problem is when i am changing the time of my machine the changed time only saving to registry. Is there any chance to access the GMT time so that its independent of machine and nobody can change the time.. Please give some help ...

Choosing a VS project type (C++)

Hi all, I do not use C++ much (I try to stick to the easier stuff like Java and VB.NET), but the lately I have not had a choice. When I am picking a project type in VS for some C++ source I download, what project type should I pick? I had just been sticking with Win32 Console Applications, but I just downloaded some code (below) that w...