visual-c++

Recompiling same code produces different executable in VC++

I developed a Windows command line tool using C, and compiled it in VC++, sometimes back, and checked-in the source code. I cleaned the project before checking-in, which deleted the .exe , .obj files besides others. I continued to use the command line tool though. After a couple of months, I checked out the source, compiled again, but t...

C++ Array initialization

Hi all, the code below gives compilation error when I try to create test t[2]; because there is no default constructor for this. But if I create Test t[2] = {test(1,2), test(2,3)}; Then it works fine. 1)But think of a situation, if we want to create more then 100 array element. We need to create 100 element in the curly braces like.....

vc++ video streaming app error while running in system drive

I have to reuse an application and its vc++ video streaming application. It captures the frame from the streamed video and collecting the sensor reading from hardware device attached to the system. This application works fine until or unless placed in system drive in system drives it generates error while getting sensor reading. Any ...

Specification of source charset encoding in MSVC++, like gcc "-finput-charset=CharSet"

Hello, I want to create some sample programs that deal with encodings, specifically I want to use wide strings like: wstring a=L"grüßen"; wstring b=L"שלום עולם!"; wstring c=L"中文"; Because these are example programs. This is absolutely trivial with gcc that treats source code as UTF-8 encoded text. But,straightforward compilation do...

How do I declare a string without assigning a value in C++?

I know that for an integer, you can use: int value; I tried: string str; but Visual C++ gave me an error. How do I declare it without assigning a value, then using cin >> str later on to assign it? ...

How are MS Visual C++ environments generally setup?

I come from a Java background, and the shop where I currently work refuses to use anything other than MS VC++ to build their legacy project. They don't appear to use any standards for setting up their build environment other than just building it using VS2005 and clicking the compile button. I was wondering if there was anything closer...

Using valid STATIC member function of class that can't be installed

Hello, I have following piece of code: It compiles without problems under gcc-3.4, gcc-4.3, intel compiler, but fails under MSVC9. MSVC tells "use of undefined type c_traits<C>, while compiling class template member function void foo<C>::go(void) with C=short. The point it the compiler tries to install unused member function of unuse...

Compiler warnings with MySQL++ with release configuration.

For some reason I get some warnings about "non dll-interface class" when building with a release configuration, but not debug. I've compared the release and debug configurations, and my ones with the MySQL++ example ones, however I cant see which setting is causing these warnings. 1>c:\sql\mysql 5.0\mysql++-3.0.9\lib\qparms.h(49) : war...

Help finding issue with tooltip on CMFCMenuBar

I have an MFC app using the new UI features released in the Feature Pack and I'm having trouble with tooltips on the menubar. By default, I beleive tooltips are not enabled on menu items. Yet whenever I hover over the 2nd item in any of the menu lists I get a tooltip with "Untitled" in the popup. The only time this does not occur is whe...

Passing a structure of data from VC++ to C#?

I want to transfer a structure of data to an application which is created in C#. I will be filling the structure in a VC++ program. How can I send it? Is structure suppported in C#? Or else if I use LPDATA in VC++: how can I get the same thing in C#? ...

visual indicator (a +-sign) to expand data in Listview (In MFC)

I want to implement a visual indicator (a +-sign) to expand data in Listview (In MFC). This Listview is part of treevew control like there is + sign befor Test, a Array type data, when i will click on + sign it should expand. Before +Test After - |Test[1] |Test[2] |Test[3] |Test[4] |Test[5] |Test[6] |Test[7] ...

Registering a winform usercontrol as a COM server

I am trying to register a winform user control as a COM Server so my MFC applications can use them. The winform control is written in C++/CLI and uses an unmanaged native dll. I want to make use of .net's terrific Interop services to register this user control as a COM server. [ProgId("MyAx.MyAxControl")] [ClassInterface(ClassInter...

NamedPipeClientStream StreamReader problem in C++

When reading from a NamedPipes server using the .net NamedPipeClientStream class I can only get the data on the first read in C++, every time it's just an empty string. In c# it works every time. pipeClient = gcnew NamedPipeClientStream(".", "Server_OUT", PipeDirection::In); try { pipeClient->Connect(); } catch(TimeoutException^ e)...

Unknown meta-character in C/C++ string literal ?

I created a new project with the following code segment: char* strange = "(Strange??)"; cout << strange << endl; resulting in the following output: (Strange] Thus translating '??)' -> ']' Debugging it shows that my char* string literal is actually that value and it's not a stream translation. This is obviously not a meta-charac...

how to configure opencv 1.2 in visual c++?

hello, i am trying to do a project in visual c++ using opencv library of version 1.2. but i cannot proceed forward due to the difficulty in configuring opencv 1.2 in vc++.please anybody help me.... ...

HTML parser to parse images and hyper link in C# or in C++

Possible Duplicate: Library Recommendation: C++ HTML Parser Hi all... Can any provide me a sample link which can parse all the images and .css files assosiated with web page... i know the logic.. but i m failing in one or the other possibilities... i am not getting any documentation that how web-browser download the entire webp...

COleDataSource/COleDropTarget cancel drag&drop operation

I have implemented my custom drag&drop by deriving from COleDataSource and COleDropTarget. Everythings work fine but I have an scenario that makes the application crashes. That happens when the dialog where the drag&drop controls are placed is destroyed while the user is in the middle of a drag&drop operation. This is not usual because ...

changing the character set in an MFC dialog application

when I change the character set in the general configuration properties from Unicode to not set it cause a different style of dialog box when you run the project. The buttons are darker and squarer. Does anybody know if is possible to change the character set whilst keeping the nice style of dialog box? ...

How to tell if I'm leaking IMalloc memory?

I'd like to just know if there is a well-established standard way to ensure that one's process doesn't leak COM based resources (such as IMalloc'd objects)? Take the following code as an example: HRESULT STDMETHODCALLTYPE CShellBrowserDialog::OnStateChange(__RPC__in_opt IShellView *ppshv, ULONG uChange) { TRACE("ICommDlgBrowser::On...

how to add windows 7 ribbons to a WTL app

Has anybody tried to use the native windows 7 ribbon control in a WTL app? I mean the control behind: #include <UIRibbon.h> or an example for the MFC. (i don't talk about the ribbons from the MFC Feature Pack!) --- Sven ...