visual-c++

What does this OpenCV exactly program do?

I want to know exaclty what this program does: #include <iostream> #include <cv.h> #include <cxcore.h> #include <highgui.h> using namespace std; int main(int argc, char* argv[]) { printf("Hello world\n"); IplImage *img = cvLoadImage("C:/Program Files/OpenCV/samples/c/lena.jpg"); // Create a window cvNamedWindow( "result", CV_WINDOW_AUTO...

Memory debugger for mixed-mode C++ applications

I have to maintain a large C++ mixed-mode application (VC++ 2005, CLR-support: /clr:oldsyntax). I suspect the program has a number of memory leaks but it's hard to find them manually. For native C++ applications we use Purify (and Valgrind on Linux). Unfortunately Purify does not support mixed mode assemblies. Anybody here knows a dece...

how to read and display an image havin extension .0fm and size 2933*2734 using visual c++ 2008 express edition

i am extremly new user of vc++..so here 1 que...how to read and display an image havin extension .0fm and size 2933*2734 using visual c++ 2008 express edition..i tried lots of thing but it didnt work..can someone help me in this with code?? ...

getting the right compiler for C++

I am trying to learn c++ but most of the tutorials and books I have read or looked up teaches you this... (I am assuming like most tutorials, they are teaching in the beginning to code either in win32 console or CLR console. In either case the following does not work.) #include <iostream> int main( ) { std::cout << "Hello World\n"...

Copy asset files to /Debug

Using VS 2008 I want to copy files in the project folder to the /Debug folder on each build. How can you do that? There's an answer for C# but it doesn't work for VC++ (xml parse error on project load) ...

How to print string C++ mfc

Hi all I created project using VS2008 wizard SDI > CView How can i print some text from Cstring to my main window CView for example in dialog window with list box i use smth like this m_ListBox1.AddString((LPCTSTR)s); ...

The problem of adapting the MSVC++ code for C++Builder- __declspec(align(n)).

I have a huge issue of adapting the code into C++Builder. What is the equivalent in C++Builder for __declspec (align (n))? I do not mean the #pragma pack ([show] | [push | pop] [, identifier], n). I need something for the macro. I have a problem with adopt a code below (especially for __declspec(align(n))): #elif defined(_MSC_VER) #d...

pointers vs. references vs. a regular pass by value c++

Please read before answering. I dont want you to state the obvious for me. THANKS :D I am trying to differentiate between pointers and passing by value. And I think I understand them but one thing the source I was reading wasnt clear on is what is the difference between passing a pointer and passing by value. consider the following... ...

Is There any handy way to get windows XP, windows 7 current login User Name in VC? Many Thanks!

I want to get current login user name in windows xp, windows 7, in c++. How can I do this? Is there any handy API without authority problem? Many thanks! ...

How to convert virtual key code to character code ?

In the onkeydown() handler I am getting 219 as the keycode for '['; however, the actual character value of '[' is 91. Is there any way to map these two? ...

converting Byte to bit..

I am currently working on visual c++ 2008 express edition. My project is based on reading satellite images and applying image processing on them. Each image file has an ".0FM" format and is of 8Mb size. Until now I have been able to read the file (i.e., "*.0FM" ) using a FileStream and into a Byte array, the size of the byte array is 8...

how to create png image file in vc++ video application

am writing application for capture image from camera using directshow.and write BMP image .am using samplgraber for capture buffer.using cimage for write image.how to write png image file. ...

CScrollbar works on one pc but not on any others

I've written some code in c++ using a CScrollbar which scrolls a CWnd and treeview at the same time. This works perfectly find on my pc, but on other pc's in the office it has problems: it only scrolls up it allows the user to scroll when they don't need to I've tested this on Vista, XP, and Windows 7 and they all have the same resul...

Hiding a Cmd Window which is shown on using system() command.

I have created a User interface in C++\CLI application which uses a C dll for manipulating exif files. This C dll uses system() funtion opens cmd window and a notepad file for editing and when we close the note pad file the entered data is edited to the exif header comment. Now I have to hide this cmd window I have used "start \b" but th...

How to change the CDockablePane caption

How do I force a refresh the caption of a CDockablePane in the MFC feature pack? I'm working with the tabbed visual studio style example, and I want to change the captions for the tabs. These seem to be cached somewhere though, as when I change from the defaults, it uses what the app used on it's previous run. I can find nothing in ...

Deploy unmanaged dependecy dll within a .NET control

Hi, i've a c# wincontrol that depends on a bunch of c++ unmanaged dlls. dotnetctrl.dll + +--myliba.dll + +--mylibb.dll Is there a way to include these mylib[a|b].dll when deploying the dotnetctrl.dll? i.e. When in a project I add a reference to dotnetctrl, is there a way to make the mylib dlls available in the right path just li...

Calling a second dialog from a dialog window fails to make either one active

Sorry for stupid questions, I'm doing everything as described in this tutorial: http://www.functionx.com/visualc/howto/calldlgfromdlg.htm I create the dialog window and try to call another dialog in response to a button press using the following code: CSecondDlg Dlg; Dlg.DoModal(); Modal window appears but isn't active, and main wind...

VC++ How do you "Fit to Screen" based on resolution?

How do you fit a project to the screen depending on it's resolution so all pictures and components involved increase or decrease in size and the difference of space between them is kept in consistent ratio with all resolutions? ...

Is it possible to get Logged in user Non Restricted token from a service on Vista?

Hello All, I need to create a process with integrity level high, so that it can do all the administrative tasks. But the created process should run in the current logged in desktop i.e. it should not run in session 0. By default only administrators will log on to the console. The service should launch the process, as service is running...

MSVC Dependencies vs. References

I have always used the Visual Studio Dependencies option to ensure that, for example, when building my C++ projects, any dependent LIB or DLL projects are also built. However, I keep hearing people mention 'references' and wondered, with VS 2010 on the horizon, I should be changing how I do this. Are there any benefits to using referen...