visual-c++

C++ How do I use an onClick event to create a textbox?

I'm trying to create a visual c++ application which has a button that when clicked creates a text box, and when clicked again creates a text box underneath the last one created. Then a button which deletes the previously created text box. Where do I start? Does anyone have any samples of this? Thank you! ...

When compiling x64 code, what's the difference between "x86_amd64" and "amd64"?

When compiling code with VC++, MSDN gives you the option between using the x86_amd64 toolset or the amd64 toolset (when calling vcvarsall.bat). How do I choose between those two when compile x64 code? Will the amd64 option churn out more efficient x64 machine code than the cross compiler? ...

Is Visual C++ optimizer sensitive to amount of memory available?

Turns out it is perfectly valid for a C++ compiler to emit different machine code when recompiling the same program with exactly the same compiler/environment/whatever settings. Which implies that the compiler optimizer can decide how "deep" to optimize depending on various factors, amount of available memory included. Does anyone have ...

Global variables not destructed in main thread?

I have a mixed-mode executable and I noticed that the constructor of my native global variables is called in the main thread, but the destructor is called in some other thread. The name of thread is 'Thread::intermediateThreadProc'. The global variables are What is the reason for this? And what is this 'Thread::intermediateThreadProc'...

log function misbehaviour!!! Any clue?

Hi guys, I am writing some program in C. It has a part where it does some probability calculations, where I am using log function. normal library function log()... The code is something like this double somevalue = 0.29558101472995091; temp = log(somevalue) And guess what? The temp gets value -1856.0000000000000!!! As the value gi...

c++ use new to Image gdi+

im using gdi+ to output my images. i tried to use the keyword new but it didn't work. shot(L"image name") = new Image; that didn't work any other ideas how to make it work ...

c++ special variable name

When I create variable I just put the a name for it, but can I create the name of the variable like this: int var+1= 1; So basically that should be: int var1=1; I know I can't use the + sign to do that but is there way to do it? EDIT int g=1; string hello+g = "sdljfsdl"; // So hello+g will be hello1 So it is like mixing variabl...

c++ display more than one image gid+

im trying to display image when left mouse button is down. i can display the image but if the left mouse button is down again than the older image would be deleted. here is my code display image function { Graphics graphics(hdc); POINT pt; GetCursorPos( ScreenToClient(hWnd, Image shot(L"RegularShots.png"); grap...

How to print HRESULT value to messagebox?

How to print this hr value to a messagebox? HRESULT hr = pUnkSite->QueryInterface(IID_IWebBrowser2, (void**)&m_spWebBrowser); ...

DownloadComplete event does not been called by BHO

It seems that my program does not handle the DownloadComplete event. Can someone guide me where I did wrong? class ATL_NO_VTABLE CStockBar : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CStockBar, &CLSID_StockBar>, public IDeskBand, //public IObjectWithSite, public IObjectWithSiteImpl<CStockBar>, publ...

get weird cursor position

Ok so I'm working with vectors today yaya! well im also working with getcursorpos() and i get weird results. here is the code: VOID fRegularShot(HDC hdc, HWND hWnd) { Graphics graphics(hdc); Image shot(L"RegularShots.png"); long index=0; while(index<=(long)pRegularShots.size()) { index+=2; int x=pRegu...

IBM Quest Market-Basket Synthetic Data Generator

I recently need IBM Quest Market-Basket Synthetic Data Generator for my study on association rule mining. I found the program source code at link http://www.cs.indiana.edu/~cgiannel/assoc_gen.html. But I couldn't compile this code on visual studio 2008 (because I haven't linux on my system) I need the version of this code for visual st...

how to access files in a resource dll

Hi, I have created a resource DLL for an IE addon with Visual C++ in Visual Studio 2005, but I cannot access the files (html and icons) within the DLL. I tried with and without a resource file but I still haven't been able to access them. the /NOENTRY option is set, since it is a resource dll. to access the resources I use a path similar...

Is there a function to convert EXCEPTION_POINTERS struct to a string?

Does anybody know of a function to convert the EXCEPTION_POINTERS structure returned from GetExceptionInformation() into a string that I can log? I don't want to roll my own if it's already been done. EDIT: Basically, I've added the __try{} __except(){} blocks to help the app fail gracefully on a critical error. While I'm at it, I'm t...

Is there any Visual C++ compiler for linux supporting most of VS Visual C++?

Is there any Visual C++ compiler for linux supporting most of VS Visual C++? If there is no such what is best alternative for porting\adapting your visual C++ code to? ...

What are general steps for me to port my project to mono?

I have a dll. and visual C++ source for it. (my dll is visual c++ wraper around some ffmpeg av* libs - another precompiled dll's) while in the same solution (.sln) I have C# project that uses my dll. what are general steps for me to port my project to mono? ...

Current function address - x64

Hello, I am working on this small project where I'd like to generate the call graph of an application - I am not planning to do anything complex, it is mainly for fun/experience. I am working on x64 platform. The first goal I set myself is to be able to measure the time spent in each function of my test application. So far my strategy ...

c++ left mouse button down help

ok i know how to do the left mouse button down evet(WM_LBUTTONDOWN). but im having some troubles with it. when use it with vectors it seems to add 101 elemnts everytime the left mouse button is down. i think that every time the mouse button is down, it sends 101 messages to WM_LBUTTONDOWN that causes 101 elements to be added. here is the...

Bugs/issues list for Visual Studio 2008/2010

Is there an official / unofficial list of bugs and issues in Visual Studio, or any of its components? ...

Install the Boost library in Visual C++ 2008

I have downloaded Visual C++ 2008 and I also have the Boost library, v. 1.44.0. How to can the Boost library be installed in C++? I also have Visual C++ 2010. ...