| _variant_t to System::Object (2 replies) |
| microsoft.public.dotnet.languages.vc |
| How can I convert a variant t to a System::Object, or System::Object to a variant t? Thanks a bunch mark |
|
| Pointer convertion. (2 replies) |
| microsoft.public.dotnet.languages.vc |
| Is it possible to convert a double gc pointer into a Byte gc Pointer like this double d gc[] new double gc[10]; Byte t gc[] something cast Byte gc[] (d); E.g. dynamic cast, reinterpret cast or try cast do not work. |
|
| How do I create a *real* DLL using .NET? (10 replies) |
| microsoft.public.dotnet.languages.vc |
| Hey fellas, Asuming I want to write a global hook, I'd need to put my hook proc in a DLL. Now .NET DLLs are not exactly real DLLs, or at least they don't seem to be real DLLs. So can someone give me a few directions. Need not even be solid, just something vague would do. I'll figure out the rest ; ) It's more fun that way... Or is it simply impossible to write a global hook using .NET? Nish |
|
| heterogenous collections (7 replies) |
| microsoft.public.dotnet.languages.vc |
| Is there any way in UC or MC to build an array of non like items ? For instance, in C#, I can say: object aTuple [] { 1, "aString", 3.141592654, 16, aObject, "temp", 1001001 }; Is there an equivalent way to do this in UC or MC ? Thanks, Lynn McGuire |
|
| better way to use strings in managed and unmanaged code (2 replies) |
| microsoft.public.dotnet.languages.vc |
| i am upgrading an application, as a step one i changed one of the core class to gc and updated its properties etc. now if i expose string properties as System::String it gives hard time to all other classes those uses it. beacuse then i have to change each part by contverting between CString and System::String and replacing use operator with System::String::Compare or otherwise i have to conver St... |
|
| FAQ Arrays from Microsoft (2 replies) |
| microsoft.public.dotnet.languages.vc |
| included is the contents of langaugefeatures/arrays/arrays.cpp from the samples in VC . This is how I learned the 'Object * foo() []' tricks.. /////////////////////////////////////////////////////////////////////////////// // // Copyright (C) Microsoft Corp 2000. All rights reserved. // // Run: cl /CLR arrays.cpp // // Description: Show the creation and use of both single dimensional // and multi ... |
|
| Detect left vs. right click event (2 replies) |
| microsoft.public.dotnet.languages.vc |
| How do I tell whether a click on a control is a left click or a right click? I need to be able to tell this within the click handler (which I already have working)... / Peteroid \ |
|
| Byte with custom memory block? (6 replies) |
| microsoft.public.dotnet.languages.vc |
| I have a very large block of data in a fixed memory location that I want to pass around as a managed Byte[]. Is this possible to do without copying the whole block into a new array? If it's not possible with MC , is there a way to do it using raw IL? Sean |
|
| Dynamix arrays (5 replies) |
| microsoft.public.dotnet.languages.vc |
| What I'm trying to accomplish is to write a function that will return an array of points and the number of points in it however it's proving far more difficult than I would have previously thought. Here's what I have: /**********/ long MakePoints(POINT *PointList) { // Do whatever's needed here to create points PointList new POINT[10]; return 10; } void SomeOtherFunction() { POINT *myArray; long N... |
|
| multi-dimensional array differences in MCpp & C# (7 replies) |
| microsoft.public.dotnet.languages.vc |
| Hello. I hope someone can help me understand what IL DASM is trying to tell me about the 2 assemblies I have. I have a managed C class that defines a number of methods with signatures similar to this: virtual bool TwoDimBoolean(bool param0 gc [,] ) gc [,]; Then, in another assembly, a C# class derives from and overrides these like this: public override bool [,] TwoDimBoolean( bool [,] a ){} When I... |
|
| How do I use resources? (2 replies) |
| microsoft.public.dotnet.languages.vc |
| I wish to take some bitmaps and make them usable on anybody's system. Right now I get bitmaps from absolute locations ala: Bitmap *bm ptr new Bitmap( "c://Images//image01.jpg" ) ; Is there a way to do this relative to the directory where the application executes from? Another thing I'd like to do is have the images "imbedded" in the application. I'm guessing this is what resources are for. How to ... |
|
| When I rename objects in the code the old name is still used (2 replies) |
| microsoft.public.dotnet.languages.vc |
| When I rename objects in the code the old name is still used. In the region Windows generated code there's a kind of translation to the new name. So in my code there stands: private void button1 Click(object sender, System.EventArgs e) instead of: private void OpenAccountsForm Click(object sender, System.EventArgs e) The first example makes reading the code a lot more difficult than the second one... |
|
| typesafe var sized array. (2 replies) |
| microsoft.public.dotnet.languages.vc |
| Hi, I am very new to .NET development. I am looking for an class that will provide typesafe variable sized arrays. gc[] Is typesafe but has a fixed size. ArrayList has variable size but it us not really typesafe (everything is a Object *) Am I missing something here. I am used to something like std::vector T which forces every item to be of "T" type. Inside the .NET framework there are pleanty of ... |
|
| Application Directory (7 replies) |
| microsoft.public.dotnet.languages.vc |
| How does one generate a String which represents the hard drive directory the application is in? / Peteroid \ |
|
| Error 0x80131019 strikes back but with dirrerent conditions (4 replies) |
| microsoft.public.dotnet.languages.vc |
| Hi All, I'd greatly appreciate any suggestions on how to overcome that nasty 0x80131019 error. I have searched .NET groups archives and everything I could found were advices to put an assembly to GAC or to change "Copy Local" property value to False. Unfortunately, this does not apply to my case as I am trying to load an assembly written in Managed C into dynamically created AppDomain. The code sn... |
|
| .NET type casting (3 replies) |
| microsoft.public.dotnet.languages.vc |
| I have created a successful mouse click event handler and applied it to a PictureBox. The handler is of the form: void PB Click( System::Object *pb object, System::EventArgs *e ) { // handler code to go here } Now, I know that 'pb object' is a PictureBox. How to I access 'pb object' as a PictureBox? / Peteroid \ PS This is in the context of a Managed C project in VC .NET. |
|
| Calling Managed C++ Wrapper From C+ (Almost got it.) (4 replies) |
| microsoft.public.dotnet.languages.vc |
| I need some help wrapping some old C code with managed C for use in C#. I have a lib file called ode.lib and a set of header files that came with it. I started a new Managed C app and set properties to include the directory with the header files. I also added the line: #pragma comment(lib,"ode.lib") to my Stdafx.h header. All this seems to be fine as it all compiles cleanly. I made a new .h and .c... |
|
| How do I create an array of PictureBoxes? (6 replies) |
| microsoft.public.dotnet.languages.vc |
| The following code generates an "invalid for gc array element" error at build time: value struct MyControls { static PictureBox *My Matrix ; // on screen picturebox matrix (array) }; void Create MyMatrix( long element count ) { MyControls::My Matrix new PictureBox[ element count ] ; // *** error occurs at this line *** } I want to create an arbitrary length array of PictureBox controls. Help! :) /... |
|
| is Managed C++ worth looking into? (10 replies) |
| microsoft.public.dotnet.languages.vc |
| i got the prerelease profiler from compuware, just to find out it only works with managed code. so for the first time i look around about managed c and managed code and im not sure if i shall like it or not so i would like to get some recommendations about sites that explain managed c very well and should those make me like managed c even more which books about managed c can be recommended? thanks... |
|
| Adding Timer Control to Windows Form? (5 replies) |
| microsoft.public.dotnet.languages.vc |
| I am trying to add a timer control to a windows form through code in VC ..NET. I had no problem adding my other controls such as buttons, textboxes, labels, etc.....but with the timer this is not the case. I am getting this error (the source code is at the bottom of this message) error C2872: 'Timer' : ambiguous symbol could be: 'System::Threading::Timer' or ''System::Windows::Forms::Timer' ChartF... |
|
| Console::WriteLine simple queston (9 replies) |
| microsoft.public.dotnet.languages.vc |
| Using C#, you can write: int x 10; Console.WrieLine("Variable x is {0}", x); But when I try the equivalent C code: int x 10: Console::WriteLine("Variable x is {0}", x); I get an error about not being able to convert the second parameter to a type integer. What's the problem? |
|
| TextBox problem (2 replies) |
| microsoft.public.dotnet.languages.vc |
| The MSDN library says this about the TextBox control: "To restrict text from being entered in a TextBox control, you can create an event handler for the KeyDown event in order to validate each character entered in the control." Greaaaaaaaaat! "Validate each character" HOW? The KeyDown handler returns an argument set, all of which are read only except 'bool Handled'. Now there are three Key handler... |
|
| Where is the "Find" method of String class in C# ? (2 replies) |
| microsoft.public.dotnet.languages.vc |
| In MFC, CStrig class have "Find" method. In C#, Do not string class have "Find" method ? If string class do not have "Find" method in C#, do the replacement of "Find" method exist? Thanks. |
|
| Trouble with System.Enum.Parse() & unboxing (3 replies) |
| microsoft.public.dotnet.languages.vc |
| Has anyone had any success with Enum::Parse() in Managed C ? I can't seem to get around the internal compiler errors... I'll start with a simple unboxing problem: #using mscorlib.dll using namespace System; public value enum E {Hello}; void F() { Object *o box(E::Hello); E e *dynamic cast box E * (o); } The cast pukes on an internal compiler error at msc1.cpp, line 2844. Replacing dynamic cast wit... |
|
| help (3 replies) |
| microsoft.public.dotnet.languages.vc |
| I've created Explorer style application (using MFC Application Wizard from VS.NET) with the list view on the right pane. The problem is that wizard generated code, which is supposed to change list view styles (report, large icons, small icons) doesn't work at all :( The same code works in VS6 just fine. I think that something is wrong with the new MFC... But does anyone know how could it be fixed? |
|