Answer Questions
earthmaker how i can put a dataset in a unmanaged struct
in vc.net: struct Test{ DataSet test1; int test2; }; then i got a error: 'error C3265: cannot declare a managed 'test1' in an unmanaged 'CProcess::Test' how i can work it out ,thanks Either convert to use a ref struct, or use gcroot ( http://msdn2.microsoft.com/en-us/library/481fa11f.aspx ). ...Show All
Jean St-Arneault Dialog background
What is the better way to set/change dialog background (by image, not color). It is also possible to set tiled, center and stretch parameter Thanx if somebody can help me. Lewix Ok good way. I had known about to handle event OnEraseBkGnd().... But because i have to use a bitmaps as background, (not jpg for example), mfc application will become higher (as size and ram usage) I only miss to be able to hand ...Show All
codelinezero I am having a problem running a basic program in C++ that took me about 2 seconds to make.
Can anyone help me out with this Please. ------ Build started: Project: Exterminator!, Configuration: Debug Win32 ------ Compiling... stdafx.cpp .\stdafx.cpp : fatal error C1210: /clr:pure and /clr:safe are not supported by the version of the runtime installed Build log was saved at "file://c:\Documents and Settings\(REMOVED)\My Documents\Visual Studio 2005\Projects\Exterminator!\Exterminator!\Debug\BuildLog.htm" Extermin ...Show All
Shawn Stern socket--recv()--DataConversion--help!!
Hi , I am infancy to socket programming .I need to connect to an external device through TerminalServer4 and i should be able to send command & receive output. Using the following code, i am able to send data to the external device and able to receive data. But i am receiving data in special characters from the external device.When converted to int, i got the output as -1,-3,3,-1,-5,3,-1,-5,1 (total i received 9 bytes ). But the resul ...Show All
Kingsley Tagbo VS 2005 compile problem with asserts
I just started compiling my C code with VS 2005 (I was using VS 2003) and I ran across a compilation error that I've never seen with any other Microsoft , Intel or GNU (in multiple *nix platforms) compiler. The code calls macros from other macros and more importantly has an assert. When I compiled with -E, I see the following code generated: { if ( (int)((( (void)( (!!(0)) || (_wassert( [ "0", [ "d:\\mywork\\cmochk\\cmop ...Show All
gsquaredb Funny Error
Hello, I got this error when I try to view my form in designer mode: The name 'components' is already used by another object. Hide at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SetName(Object instance, String name) at System.ComponentModel.Design.Serialization.ContainerCodeDomSerializer.DeserializeInstance(IDesi ...Show All
Steve Cronk Unresolved external when compiling xxx_i.c (IID and CLSID) using /clr
I'm migrating a VS6.0 solution to VS2005. The main exe has references to some dll's. When compiling the exe using /clr, I get "cannot compile C file 'xxx_i.c' with the /clr option"(the auto generated files containing definitions of all IIDs and CLSIDs). So - change the properties for these files to compile as C++ (/Tp). Now they compile without errors. BUT - I get "unresolved external symbol" from the linker on all IIDs and CLSIDs define ...Show All
CarlosRodrigo Static const C++/CLI class members
Static const C++/CLI class members can be changed from C# client: public ref class Server { public: static const int someValue = 25; }; C# client code: Server.someValue = 50; // successfully compiled How can I prevent this If you don't need your field to be static, you can use the literal keyword which is the direct equivalent of the C# const keyword. The initonly keyword is a ...Show All
Ooogaleee Simple prblem with VS.Net 2005 Intellisense
I keep having problems with the intellisense (IS) not working properly. That is, say I have a class Foo and I declare a variable Foo f; When I try to get the intellisense to start working by typing f. nothing comes up. To reporduce the problem in a simple setting here is what I have done. Create a new project, add a new class Foo. Now add a new member function to the .h file and call it OldFunction(). Problem 1: Click over to the Foo.cpp f ...Show All
Sahil Jain rand() not being random!!!
OK An other problem which I really need assistance with I'm using srand to generate random numbers out of a range BUT i always get the same sequence of numbers!! But I notice the problem come from rand() i tried to create a new project with only this : #include <ctime> #include <iostream> using namespace std; void main() { srand(time(NULL)); cout << rand() << endl; cin.get(); cin.ignore(); } ...Show All
Jarrod Sinclair Get key user entered
I searched in msdn library, but i haven't found anything good... I am actually doing a game, all the code of how it should move is ok, but the only thing I need is to be able to determine where is the mouse and what key did the user press. Example: you press somewhere, it pops a dot at that place Example 2: you press right arrow, the dot moves right... I am ok with the code of displaying the dot, but not with the getkey function or w ...Show All
TFink C++/CLI string tables
I made the move from MFC to C++/CLI about 6 months ago and one thing that really peeves me is the new way resources are handled by Visual Studio 2005. I refuse to directly edit resource files (via the VS resource editor) because it too often messes up the layout of my form or breaks it all together. I've been very bad and placed a lot of string literals in code, until I figure out how I want to handle them. My question is...for those of you w ...Show All
FrankenJeroen How to compile C++ function to be used by C# ?
I want to write a native C++ function that I can later access from C#. Please keep in mind I do not have much experience developing on windows, (mostly unix) and that my only windows compiler is VS2005. I tried creating a MFC DLL. I am able to access this from a C++ .net program, but not from a C# program using P/Invoke. It seems that a plain MFC DLL is not "good enough" for use with DllImport. Is this correct It seems that I ...Show All
Manip Illegal left operand has type 'float' (trying to use the modulus operator)
ok this is the error: error C2296: '%' : illegal, left operand has type 'float' I know I can't use a float with the modulus operator but I need to use it (the modulus operator, and the decimal). I need the decimal in the variable to find change... this is the code that I wrote so far: #include <iostream.h> #include <iomanip.h> main() { int pennies; int nickels; int dimes; int quarters; int dol ...Show All
Alexander D. Performance problems after porting to VS 2005 from 2003, native C++ code vs STL.
After porting code from studio 7.1 to 8.0 beta 2, performance (function execution time) decreesed twice. In each two cases code was compiled with max speed optimisation. I tried each useful in my case compiler feature for increasing performance, and nothing helps, 7.1 still x2 faster. Code use basic STL tamplates such as vector, map, iterators, heap functions and nothing else. Please help to understand this fenomenal. ...Show All
