Answer Questions
Myime no Code Snippets in C++?
Somewhere I read that code snippets are not aplicable in C++ code. Is that true and why I only want to use snippets to insert documentation templates for classes, functions etc. at a first look I do not see any technical reason for not supporting that feature. Thanks for your help, Tobias No Insert Snippet, no Snippets folder in the VC folder and no Snippets editor. Perhaps it has something to do with C++ class declarations and metho ...Show All
Gentleman Auditor Program database manager mismatch
I have been working with vc++ express for about a month, and all my projects were fine but now whenever I compile anythingi get the following error: fatal error C1902: Program database manager mismatch; please check your installation I searched for a solution on Google and MSDN but neither showed anything i could make sense of. Yr suggestion helped me too. Thanks. Sam ...Show All
dlausch ap libraries
Is there a download for getting ap libraries for Visual C++ 2005 Express Edition Beta 2 I presume that there are onr or more header files in a specific directory, say C:\AP\include, you need to add this path to the set of include directories that are searched by the compiler. There may also be some library files, say in C:\AP\lib, you need to add this directory to the set of directories searched by the linke ...Show All
cacosta why would operator=() and operator*() conflict in ref class??
I have some code that boils down to this: ref struct A { A % operator =( const A % other) { return * this ; //<<-- offending line - thinks I mean make "this" an int as defined below: } int operator *() { return _i; } int _i; }; int main( array <System::String ^> ^args) { A a, b; a = b; return 0; } So when I compile this example in ...Show All
TGrant misuse of strcpy_s in CPUID example
The file cpuid.c in the CPUID example uses a lot of strcpy_s calls in the map_mname function. These calls are malformed however... The length of the destination string (m_name) is unknown so the length of the source string is used (erroneously) instead. I have replaced the void function, map_mname, with a function that returns (const char *) and it returns the string litteral. I replaced each pair of strcpy_s(); break; statements with a retur ...Show All
xd How to see if instance created?
Hi, I have a managed array of a class called image I am generating an array of 'image' array <image^>^ primary_image= gcnew array <image^>(100); in a loop, i then set my image array using usual format primary_image[loop] = gcnew image(....data for constructor) ... all well and good however, i am not creating an instance of primary_image[loop] for all 100 values -- some are skipped how can i check whether an array element has had ...Show All
Milow Can and how do I extend an array of objects during run time?
Hi, I created an array of objects, based on a class I created to hold data only, at the start of my program. During the run time, I may need to add an unknown number of additional objects to new data. Can I do this How can I increase an array of objects during run timge, one at a time as the need arises For exmaple: myClass aryObjects[10]; .............. How do I add to the aryObjects and make it a aryObjects[11] Thanks. ...Show All
Jaapjan Tinbergen How can I test if a gcroot<String^> has a String assigned to?
There must be a way to test if my "gcroot<String^> m_aString" has been a real String assigned to (by executing "m_aString = gcnew String(L"")"), but I cannot find it. The compiler accepts my setting the variable to nilptr (m_aString=nilptr) but wouldn't allow asking "m_aString == nilptr". I tried countless other ways, but to no avail. Can anybody tell me how to do it -- Manfred Thanks, this works fi ...Show All
SGrieco ODS_SELECTED for MFC CMenu::DrawItem no longer works?
Hi all, I write an application with MFC owner-draw menu. Under windows XP it works fine, but under windows Vista Beta2 5320, my DrawItem() no longer receives the selection status of the menu item. The code looks like this: ...(omitted) if (lpDrawItemStruct->itemState & ODS_SELECTED) { (draw selection rectangle) } After tracing, I found that itemState will never have ODS_SELECTED turned on. However, non-owner-draw menu wor ...Show All
JeremyB reference counting problem
Hello everyone. I have been developing two ActiveX components. One is written in VC++ 6 and the other is written in VB6SP6. The VB component is the container of the VC++ component. The idea is to use the VB component as a browser plugin. My problem is when I shout the internet explorer off. I get an assertion on line 52 in cmdtarg.cpp. The line is ASSERT(m_dwRef<=1); and m_dwRef is equal to 2. I have been reading some articles ...Show All
Oguz Mazlum _findfirst() prototype changes
I recently noticed a difference in the function _findfirst() From msdn we have: VC6: long _findfirst( char * filespec , struct _finddata_t * fileinfo ); VC2005: intptr_t _findfirst( const char * filespec , struct _finddata_t * fileinfo ); Since I need to build code to support multiple versions of VC++ I need some way to distinguish which version to use. Otherwise I end up getting type problems which resu ...Show All
X5-Eric errors while executing vc++ code
Hi I have one opensource of vc++. While executing this code it is giving the following errors. 1)error C2433: 'HWND' : 'inline' not permitted on data declarations 2)error C2143: syntax error : missing ';' before '{' 3)error C2447: '{' : missing function header (old-style formal list ) 4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 5)error C2086: 'int CALLBACK' : redefinition If any one got these erro ...Show All
Quartzite Automation detection
I have an application that you can run through automation and that you can also run doing the standard double-click and it loads thing. well is there a variable or method i can query at any point during my application that will tell me whether or not the application is being run through automation or otherwise Thanks Will Usually by a message box <bg>. The problemis t ...Show All
Paul Dettorre Importing class from dll
Hi My problem is that I cannot import a class from a dll without an import library. Thank You, Attila. Just a few more details: I have found, and can use LoadLibrary, GetProcAddress etc. functions, but only for importing functions. What is the name of the function I should use instead of GetProcAddress for importing classes from my dll thanx, Attila I removed WINAPI, ...Show All
Phillip Garding MSFT My first c++ program in vc++2005 & error
In visual studio 2005, i started with my first program. And found not working. I created an empty project. Then using solution explorer i added a c++ file under source file... then typed the following code: #include<iostream.h> void main() { cout<<"hello world"; } And i got following error message : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory Can anyone help me please to ...Show All
