visual-c++

Finding the Parent of the this Pointer on Debug

In VC++, how to find the parent or the Class which it belongs to on the Debug mode using the Watch Window? ...

Missing ZoomOut on PrintPreview

Hi. I'm using code from http://www.codeproject.com/KB/printing/print_preview.aspx to initiate Print Preview for my dialog application. My application is a VC++ 6.0 app that does not use the CView architecture at all. I have managed to display Print Preview window and Zoom In works but the Zoom Out button always remains disabled. Does an...

Using AfxEnableMemoryTracking to detect Memory leaks

Has anybody personally used AfxEnableMemoryTracking function provided by MFC to detect memory leaks. How useful is it? ...

Can static_cast turn a non-null pointer into a null pointer?

I need to write code for a callback function (it will be called from within ATL, but that's not really important): HRESULT callback( void* myObjectVoid ) { if( myObjectVoid == 0 ) { return E_POINTER; } CMyClass* myObject = static_cast<CMyClass*>( myObjectVoid ); return myObject->CallMethod(); } here the void* is...

mixing code compiled with /MT and /MD

I have a large body of code, compiled with /MT (i.e. expecting to statically link against the CRT). I need to combine this with a static third-party library, which has been built with /MD (i.e. expecting to link the CRT dynamically). Is it theoretically possible to link the two into one executable without recompiling either? If I link ...

Wrapping #include directives with other preprocessor commands

Hi, I'm working on a project that uses lots of external libraries. Now, I like my projects to compile with the highest warning level available, which on MSVC is /W4. I'm also using -Wall on GCC for this project, which needs to be cross-platform. With /W4, I'm hitting a problem: I'm often including the headers of the other libraries, an...

Why you need to use C++'s "data_seg"

When I trace one open source, I saw someone has the following code #prama data_seg(".XXXX") static char *test=NULL; FILE *f1; #prama data_seg() However, even after checking http://msdn.microsoft.com/en-us/library/thfhx4st(VS.80).aspx, I still not sure why we need to do so, can someone help me to understand this part? thank you ...

c++ mouseover event

ok s it is really easy to create mouse over event if the object is NOT moving. but the problem that the object gonna be moving every 50 millisecond. it is not a string line so i can create a script it is a circle. i used to use getcursorpos(). than get the object x and y. the other problem is this p X--------------------- y | | ...

API used to know IP of the Interface in VC++ ?

Hello All, I want to know the name of API which used to know current IP of the Interface. I have two interface ethernet and WLAN.Both Interface are UP and i want to know IP of specific interface then Is there any API in VC++ that will give me interface IP ? Thanks, Neel ...

Get full running process list ( Visual C++ )

I am currently using the EnumProcesses function to obtain a list of running processes. Since my application runs in user space, however, it is not able to get handles for processes not running under the user, including System processes. Is there another method that will give me access to these? All I need are the process names. Thanks ...

Table of conversion of ISO-639/ISO-3166 based language/country locale name to Windows ones and back.

Hello, I want to convert POSIX locale names like en_US, de_DE that use ISO-639-1 and ISO-3166 codes to Windows ones English_United States, German_Germany and back. I had found following tables on MSDN site: Languages http://msdn.microsoft.com/en-us/library/39cwe7zf(v=VS.71).aspx Countries http://msdn.microsoft.com/en-us/library/cdax4...

error LNK2001:unresolved external symbol _main

MSVRTD.lib(crtexe.obj):error LNK2001:unresolved external symbol _main fatal error LNK1120:1resolved externals link.exe ...

Visual Studio 2008 C ++ stopping during Linking

Hi, I have written some image processing program using OpenCV 2.1 I received a error during linking, related to "projectname.ilk" file.(message said VS is trying a non-incremental linking). So I triied rebuilding the project. The initial message went away, but now VS never completes "Linking". It prints "1>Linking..." and stays that wa...

What does #pragma comment mean?

#pragma comment(lib, "kernel32") #pragma comment(lib, "user32") ...

Linking Issues in a Multiproject Visual Studio 2005 solution.

I'm working on a solution file (VS 2005) which contains multiple projects. There are two projects of my concern right now - one called core and another called log. The core project is the startup project and the log project has core ticked in its project dependencies. I have two files in core project - AB.h(declarations) and AB.cpp(de...

Create static library in Visual C++ Express 2010

Hi, how to create static library in Visual C++ Express 2010? When creating project, I cant find static library option. Thanks. ...

How to embed data in an application

I want to make an application, but the application will be using icons (bitmaps) for some of the menu buttons and other stuff. I want to keep my application as one simple, single standalone exe file which means I will somehow have to embed all of the icons into the application (EXE on windows) so I can load the bitmaps without having any...

visual studio c++ 2010 express gets errors using gdi

ok i just upgrade it to visual studio c++ 2010 express. when i use gdi+ i get errors not in my file but in the gdi+ header file one of the errors is this c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gdiplusimaging.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int here is the ...

IDE Like Visual Studio 2010 for Linux

Possible Duplicate: C++ IDE for Linux? Visual Studio 2010 is absolutely incredible when it comes to it's intellisense and debugger. I've been able to find some decent IDE's for Linux (Ubuntu) that have good auto completion, but I have yet to find one with a debugger as good as Visual Studio. Obviously GCC is different then MSV...

Visual Studio 2008 - Application running slower once built

Hi, I have a chess game I have created in Visual Studio 2008. It runs very well when I am debugging, but now I have finished and built the program, it lags a bit and I'm finding it a bit annoying as it was running so well in when creating/debugging mode... Can anyone shed some light on this for me, or has any body got any little tricks...