All this originated from me poking at a compiler warning message (C4267) when attempting the following line:
const unsigned int nSize = m_vecSomeVec.size();
size() returns a size_t which although typedef'd to unsigned int, is not actually a unsigned int. This I believe have to do with 64 bit portability issues, however can someone exp...
I am getting this linker error.
mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)
Please tell me the correct way of eliminating this bug. I read solution on microsoft support site about this bug but it didnt helped much.
I am using VS 2005 with Platform SDK
...
I need a combobox in an Windows MFC application that has a search feature. It should work so that if you start typing something that matches one or more items in the list, the combobox should drop-down and display those items. Kinda like popular ajax-based search boxes on the web
Do you
- know of any control that provides this functiona...
I have yet another managed C++ KeyValuePair question where I know what to do in C#, but am having a hard time translating to managed C++. Here is the code that does what I want to do in C#:
KeyValuePair<String, String> KVP = new KeyValuePair<string, string>("this", "that");
I've reflected it into MC++ and get this:
KeyValuePair<Strin...
I'm tyring to convert a MSVC project from VS 2005 to VS 2008. It contains a IDL file that outputs a header and stubs used for RPC. The VS 2005 project uses MIDL.exe version 6.00.0366. The VS 2008 project uses MIDL.exe version 7.00.0500.
Here's the problem: MIDL v6 outputs the following prototype for me to implement in my server code:
...
I know that new-ing something in one module and delete-ing it in another can often cause problems in VC++. Problems with different runtimes. Mixing modules with staticly linked runtimes and/or dynamically linked versioning mismatches both can screw stuff up if I recall correctly.
However, is it safe to use VC++ 2008's std::tr1::shared_p...
Without using any third party program to do this (i.e. without VMware ThinApp, U3 or MojoPac etc.) How to move MSVC++ 6.0 from from its install on C: over to a USB drive? So that it can be used on different PCs with no admin rights and without installing anything on the host PC? Even if it's only usable as a console application would be ...
I am new to using Windows Forms in C++ (and just in general), and I am not exactly sure of the name or if it's even possible to do.
Currently I am currently working on a school project in which we must make a program for an imaginary bookstore. I am trying right now to make a sort of list that shows what the "customer" is buying. I hav...
I am getting an error while porting my application from VC6 to Visual Studio 2005.
Does anyone have any idea what this means?
mfcs80.lib(dllmodul.obj) : error
LNK2005: _DllMain@12 already defined
in MSVCRT.lib(dllmain.obj)
...
The following code calls the builtin functions for clz/ctz in GCC and, on other systems, has C versions. Obviously, the C versions are a bit suboptimal if the system has a builtin clz/ctz instruction, like x86 and ARM.
#ifdef __GNUC__
#define clz(x) __builtin_clz(x)
#define ctz(x) __builtin_ctz(x)
#else
static uint32_t ALWAYS_INLINE po...
In Visual Studio 2005, I have a solution with explicit dependencies specified via the Project Dependencies dialog.
When I build via devenv /rebuild Release for example, the projects are built in a different order than when loading up the IDE. This is an order not allowed by my specified dependencies.
In some cases, devenv crashes :(
...
Our app allows multiple files to be selected in a file selection dialog which is shown via the GetOpenFileName function (this question also applies to folks using CFileDialog, etc...)
There appears to be a limit to the number of characters that can be typed into the filename field (259 seems to be the magic number - not sure why).
We h...
How can I draw a line chart in VC++ 6.0?
...
Is there reverse function to MFC AfxParseURL (which creates URL from service type, port and so on)?
...
When programming in C++ in Visual Studio 2008, why is there no functionality like that seen in the refactor menu when using C#?
I use Rename constantly and you really miss it when it's not there. I'm sure you can get plugins that offer this, but why isn't it integrated in to the IDE when using C++? Is this due to some gotcha in the wa...
How do YOU reduce compile time, and linking time for VC++ projects? (native C++)
Please specify if each suggestion applies to debug, release, or both.
...
I'm heavily using Cygwin (with Putty shell). But, it's quite tricky to invoke cl.exe (i.e., Visual C++ compiler toolchain) in the Cygwin bash shell. Running vcvars*.bat in the bash shell doesn't work obviously. I tried to migrate VC++'s environment variables to Cygwin, but it's not that easy.
Is there anyone who ever tried to run VC++ c...
if we know the start point and the end point for an line how can you find the all point that line pass it ??
...
I am looking at embedding perl 5.10 in a large C++ application compiled with VC++ 6.0. This leads to two questions.
1) Is it a bad idea to simply use Strawberry Perl as a dependency rather than compile my own perl with VC++ 6.0? Would Strawberry even work given the compiler mismatch? I presume Strawberry is compiled with mingw. I wo...
I need to get the Create script of a table from a SQL Server database given the table name using VC++6.0 in order to output it to a text file.
I have tried to get this using SQL-DMO Script method for the table, using GetTableByName() but it returns null. I confirmed it has the correct table by using the GetColumnByOrd method.
...