visual-c++

vc80.pdb - How do I make it go away and never bother me again?

When building static libraries with VS2005 I keep getting linker warnings that VC80.pdb cant be found with my library.lib. Apparently, as a result, the edit and continue feature of the IDE fails to work any project that incorporates library.lib What magic is needed to tell VS2005 to produce a static lib with edit and continue debug info...

What are the porting issues going from VC8 (VS2005) to VC9 (VS2008)?

I have inherited a very large and complex project (actually, a 'solution' consisting of 119 'projects', most of which are DLLs) that was built and tested under VC8 (VS2005), and I have the task of porting it to VC9 (VS2008). The porting process I used was: Copy the VC8 .sln file and rename it to a VC9 .sln file. Copy all of the VC8...

Error: The Side-by-Side configuration information in "BLAH.EXE" contains errors.

This is the error Dependency Walker gives me on an executable that I am building with VC++ 2005 Express Edition. When trying to run the .exe, I get: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (I am new to the manifest/SxS/etc. way of doing...

Is std::string size() a O(1) operation?

Is std::string size() a O(1) operation? The implementation of STL I'm using is the one built into VC++ ...

How can I increase the performance in a map lookup with key type std::string?

I'm using an std::map (VC++ implementation) and it's a little slow for lookups via the map's find method. The key type is an std::string. Can I increase the performance of this std::map lookup via a custom key compare override for the map? For example, maybe std::string < compare doesn't take into consideration a simple string::size()...

Setting command button visibility in VC++ 6.0?

How can I make the command button in my VC++ 6.0 dialog visible or invisible on load? ...

[MFC] How to get On Focus CWindow handle?

Is there any way to get the handle to the control that has focus? I am looking for a way to get the ID of control on focus in my app. After that it would be easy to get the id with GetDlgCtrlID. CWnd *pwnd = GetWindowOnFocus(); int wID = pwnd->GetDlgCtrlID(); It's the GetWindowOnFocus part that I am missing! ...

Why can't I find a Control ID in my Resource file in ATL?

Since I need to do some checks depending on which control is on focus in my app, I am getting the focused control ID like this: HWND controlOnFocus = ::GetFocus(); int controlID = ::GetDlgCtrlID(controlOnFocus); I am getting consistent IDs, but I can't find them in the resource file! Can I rely on the IDs I am getting or what? Any he...

Visual Studio "Find" results in "No files were found to look in. Find stopped progress."

Sometimes while developing in Visual Studio IDE, when you use "Find in Files" dialog to find something, the search fails and you will see the following message in the "Find Results" window. "No files were found to look in. Find stopped progress." Once this message shows-up all the subsequent searches will result in the same message. ...

LNK2001 error when compiling apps referencing STLport-5.1.4 with VC++ 2008

I apologize in advance for the long post... I used to be able to build our VC++ solutions (we're on VS 2008) when we listed the STLPort include and library directories under VS Menu > Tools > Options > VC++ Directories > Directories for Include and Library files. However, we wanted to transition to a build process that totally relies o...

2008 MFC and threads?

I was reading this thread/post: http://stackoverflow.com/questions/262298/windows-c-ui-technology and am also wondering about a non .NET UI framework. Specifically - prior to .NET having support for serial ports (I can't believe they left that out of the first release of .NET) I was forced to use MFC for an application. I had not been...

Nested templates gcc compiler 4.1.2 error

I'm trying to create a template class to insulate the users from a data type. I would have preferred to use an adapter class, but the function signatures needed to change requiring a template. In the code sample below(not the actual project just a simplified version to illustrate the problem), while in the main routine I'm able to use ...

How do I write a console application in Windows that would minimize to the system tray?

I have a written a Visual C++ console application (i.e. subsystem:console) that prints useful diagnositic messages to the console. However, I would like to keep the application minimized most of the time, and instead of minimizing to the taskbar, appear as a nice icon on the system tray. I would also like to restore the console when the...

is it possible to have templated classes within a template class?

template <class M, class A> class C { std::list<M> m_List; ... } Is the above code possible? I would like to be able to do something similar. Why I ask is that i get the following error: Error 1 error C2079: 'std::_List_nod<_Ty,_Alloc>::_Node::_Myval' uses undefined class 'M' C:\Program Files\Microsoft Visual Studio 9.0\VC\include...

Where to download older versions of Visual C++ Express

Is there a way to download older versions of Visual C++ Express. I'm particularly interested in Visual C++ 2005 Express (PRIOR SP1) and Visual C++ Toolkit 2003. I tried googling for them, but all the sites linked to microsoft.com, from where microsoft (for some reason) has taken them down. I would really appreciate if some could help me...

How to repaint the UI inside DoDragDrop

I'm implementing my app as a drag source. When I call DoDragDrop (Win32 call, not MFC) it enters into a modal loop and I don't get repaint messages in my main window until DoDragDrop returns. Unfortunately if I do a drop in the shell (a file) and the filename is already there the shell asks if I want to replace the file. But since me app...

is assert(false) ignored in release mode (VC++)?

Is assert(false) ignored in release mode (VC++)? ...

MFC: Changing font of a List control

Hi guys, I need to at run time change the font of a List Control so as to used a fixed width font. I have seen some examples which suggest I should trap the NM_CUSTOMDRAW message, but I was wondering if there was a better way of doing it. Thanks. ...

Will the c++ compiler optimize away unused return value?

If I have a function that returns an object, but this return value is never used by the caller, will the compiler optimize away the copy? (Possibly an always/sometimes/never answer.) Elementary example:ReturnValue MyClass::FunctionThatAltersMembersAndNeverFails() { //Do stuff to members of MyClass that never fails return success...

How can I debug a MinGW EXE with the Microsoft Visual C++ debugger?

How can I debug a MinGW EXE with the Microsoft Visual C++ debugger? ...