I am working on a rather large WinForms application that has dozens of controls and hundreds of functions. Right now MS makes every new event handler in the main form's .h file, and this file is growing out of control. It currently numbers in the thousands of lines, and is still growing.
What is the best way to split up the code in a b...
Source code that compiles fine on other peoples environments won't correctly work in my environment. When I do a rebuild the compile occurs but when visual studio goes to move the exe from /obj/debug/{solution} to /debug/{solution} it cannot find the exe in the /obj/debug/{solution}. To make this even more crazy even after I reinstall ...
I have just installed the Windows SDK v7.1 (MSVC 10.0) and running my code through (almost) full warning level (W3, default for qmake's CONFIG += warn_on) and am surprised about warning C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
In the following code, stream is an std::istream and token is a std::strin...
I can get the compiler (msvc++ express) to convert "string" as a CustomString in a constructor, but not with a reference. Will it therefore not have the same chance of being optimized out with a pass-by-reference anyway, like passing by value with other types can, if the compiler thinks it can?
won't implicit convert using
new xmlNode...
Windows SDK features IsEqualGUID() function and operator==() for two GUIDs that return BOOL (equivalent to int):
// Guiddef.h
#ifdef __cplusplus
__inline int IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
{
return !memcmp(&rguid1, &rguid2, sizeof(GUID));
}
#else // ! __cplusplus
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1...
How can I do that ? Can I work in VS2010 IDE but have it compile with the VS C++ 6.0 compiler?
And can I work in VS2010 IDE and have it compile by using the the VS2008 compiler ?
...
Hi,
I installed Intel Parallel Studio v1.0, and now Visual Studio 2008 is not stopping on breakpoints. I can set them, but it skips right over them, and never breaks.
Any ideas?
...
I get the following error when trying to build OpenSSL on Win32:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : error C2220: warning treated as error - no 'object' file generated
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefiniti...
I would like to use FFTW3 on Windows-64 bit. I follow the instructions on FFTW website: download the package, unzip, run lib.exe to create .lib "import libraries".
After doing so, I build my application (which runs just fine using FFTW3 dlls 32-bit) and I get the following errors:
1>pyramidTransform.obj : error
LNK2019: unresolved...
the text file is something like this:
// Signals:
// ac_mode
// ac_test
// active_mode
// adden
// analog_test_enable
// apf_user_control
// arce
// arclr
// arin
// aux_msel[1]
// auxmsel_ctl
// ....
// ....
PI="XXXXXXXXX0XXXXX01XXXXXXXXXXXX0XXX0XXXXXX0XX0X00XXXXXXXXXXXXX00XX00XXXXX
*the ac_mode correspond to X ( x means Out), ac_te...
Hi,
is the order of overloaded methods in the vtable always the same across win32 compilers?
Problem:
I have "interfaces" (pure virtual classes with no data members). They can be used via pointer from different compilers (the client gets the pointer by calling a standard c dll factory method). This works fine across different compiler ...
I want to initialize an double array with size 200, and its value is from 0 to 199 from index 0 to 199 in c++.
i know i can do it by a simple For loop, but is there a way just to initialize the double array like this?
Thanks
...
When I run this code on IE8, ShowBrowserBar returns S_OK, but the toolbar isn't shown.
On IE7 it works fine.
I saw a similar question here, by Anna, but without a working answer... :)
Any suggestions?
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(0);
IWebBrowser2 *pIE = NULL;
// Create an instance of Internet Explorer
...
I m trying with the Redo option, I have written the following code for Redo but insted of Redo Undo is working for the same. Please guide me where i went wrong.
My code sample is.....
void EIWBDoc::OnEditRedo() //for REDO.
{
// TODO: Add your command handler code here
int Index = m_FigArray.GetUpperBound ();
if (Index > -1)
{...
Let's say we have multiple libraries (DLLs) whose features one wants to use in an application, and wants to use them as a single DLL.
Is it possible to merge the DLLs into a single one, with all the features packed into it? I am not looking at the option to write a wrapper.
EDIT:
I've revisited the problem. Now all I want to do is bri...
I have just installed Visual C++ 2010 Express and I have the impression that the default mode includes C++0x features and the std::tr1 library.
error C2872: 'is_same' : ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\type_traits(941) : std::tr1::is_same'
Could you confirm that? If this is th...
Hi,
I am compiling a project into a .dll and trying to use it in another project. For most of the functions I use in this library, I get a System.AccessViolationException exception :
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at nglib.Ng_Get...
The following C++ code, compiles without warning in Visual Studio 2010:
extern void callFunc( int, int );
struct str_wrapper
{
str_wrapper();
};
extern bool tryParseInt( const str_wrapper
void test()
{
int x, y;
if ( tryParseInt( str_wrapper(), x )
}
}
However if str_wrapper has a user-defined destructor, the code generates t...
The Memory that i'm trying to allocate is not huge or any thing. i just cant allocate
1.5 to 1.7 gigabyte of contagious memory. From what i know, windows gives you 2 gigabytes of virtual space to use in your application. so, a call like malloc(1500*1024*1024) is not totally crazy. i tried malloc ,new[], VirtualAlloc all didn't work.
i...
This might be a basic question but I wish to know what people find to be more convenient for them.
I wish to have some paths added to all projects that I open in VC++. How can I make these paths are saved even after I restart visual studio.
1) Lets say for example we have Directx lib that is being constantly updated by Microsoft. How c...