vc++ Line Graph Example
Can someone please provide me with a hint on how to draw a line graph in vc++ 6.0? ...
Can someone please provide me with a hint on how to draw a line graph in vc++ 6.0? ...
I have a number of VC 6.0 projects (dsps) which build into dlls which don't have resource files. Any idea how to add resources into an existing project? The project is due for a major release shortly and I want to add a fileversion to those dlls currently lacking one. The dlls will be recompilied before release so I'm just trying to mak...
Can anyone explain how compilation works? I can't seem to figure out how compilation works.. To be more specific, here's an example.. I'm trying to write some code in MSVC++ 6 to load a Lua state.. I've already: set the additional directories for the library and include files to the right directories used extern "C" (because Lua i...
The following C++ code compiles and runs correctly for GNU g++, LLVM and every other C++ compiler I threw at it except for Microsoft VC6 and VC7: template<typename A, typename B> int HasVoidReturnType(A(*)(B)) { return 0; } template<typename B> int HasVoidReturnType(void(*)(B)) { return 1; } void f(double) {} int foo() { return HasVoidR...
for (int i = 0 ; i < stlVector.size() ; i++) { if (i == 10) { stlVector.erase(stlVector.begin() + 5 ) } } Does the termination condition part "stlVector.size()" take "stlVector.erase(...)" into consideration? In other word does stlVector.size() refresh for every loop iteration? I can't test it right now, so i post...
I know that according to C++ standard in case the new fails to allocate memory it is supposed to throw std::bad_alloc exception. But I have heard that some compilers such as VC6 (or CRT implementation?) do not adhere to it. Is this true ? I am asking this because checking for NULL after each and every new statement makes code look very u...
I wonder how to debug the following error: Debug Assertion failure Program: tomtoprog.exe File: dbgheap.c Line: 1044 Expression:_CrtIsValidHeapPointer(pUserData) ... I'm quiet new to windows development with VC++ 6 ... is there a valgrind or something like that? The tomtoprog code is not written by me and its rather messy ... so som...
I've got several large MFC applications here, and converting them into any other format is out of the question. We're expanding into other markets, and would like to make the apps work in other languages and cultures. So far, I've found occasional references as to what to do with Visual C++ version 6, with one mention that later versio...
A bit of history: We have an application, which was originally written many years ago (1998 is the first date in PVCS but the app is about 5 years older than that as it originally was a DOS program). This application communicates with a piece of hardware via serial. When we got to Windows XP we started receiving reports of the app dying ...
I want to use a recent MS C++ compiler (I need TR1) with old IDE (Visual C 6.0). I heard that I can download free command line MS C++ compiler only. Is it possible? Can I use new compiler with old IDE? If so what additional problems may arise? I want to keep VS6 cause I'm familiar with it. I want to use MS implementation of TR1 cause I ...
I have a string in C++ of type EDIT: (const char *) passed as argument to strlen, but it returns void.. damn i can't get formatting to work >.< it goes like strlen(astruct.string); Thanks.. EDIT: Did some checking, strlen("test"); still gives void.. why? EDIT: Here's the image http://img14.imageshack.us/img14/1808/strlen.png ...
How to copy CComboBox data to another CComboBox? ...
I maintain an MFC (VC6) MDI application that uses Frame Windows as views for a document. There is only one document at a time but there are several MDI-Frames each with a different view of the document data. Recently a request came up to be able to keep one of those frame windows on top of the others while being able to interact with th...
This question is related to my previous one. I have an MFC (VC6) MDI Application which has several MDI child windows acting as different views for one document. Is it possible to set one of those frames to stay on top of the others? I have tried to call SetWindowPos( &GetParentFrame()->wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP...
I have a template class defined in a header file like this. Here I have defined a static variable as well: #ifndef TEST1_H_ #define TEST1_H_ void f1(); static int count; template <class T> class MyClass { public: void f() { ++count; } }; #endif And I have defined main() function in a different cpp file like thi...
I have a CRecordSet (Visual C++ 6.0) and I'm using ODBC to connect to postgresql 8.0.8. __ The problem: I insert a row into a table with a serial id (autoincrement), and I would like to retrieve the id after my insert. I can't use the RETURNING keyword, not supported on this version of PGsql, but I can use currval('sequence'). Howeve...
I'm trying to use a std::vector<>::const_iterator and I get an 'access violation' crash. It looks like the std::vector code is crashing when it uses its own internal First_ and Last_ pointers. Presumably this is a known bug. I'm hoping someone can point me to the correct workaround. It's probably relevant that the crashing function i...
Compare these two largely identical functions. In the first, the memory for buff is allocated using _alloca. This works fine. In the second, calloc and free are used instead of _alloca. This crashes. The weird thing is that I use the calloc/free technique in almost every other GMP wrapping function I have and they all work. Here they d...
I see some legacy code checking for null before deleting the pointer. as like below if(NULL != pSomeObject)//any reason for checking for null { delete pSomeObject; pSomeObject = NULL;//any reason for assigning null } my compiler is vc6 pre-standard one though. ...
I was trying this piece of code to check whether the divide by zero exception is being caught: int main(int argc, char* argv[]) { try { //Divide by zero int k = 0; int j = 8/k; } catch (...) { std::cout<<"Caught exception\n"; } return 0; } When I complied this using VC6, the catch handl...