|
Thanks Sam, nice to see you hear in CP
I've been reading your blogs for quite some time.
I hope to see more articles from you on MC++ and COM/Interop.
regards
Kannan
|
|
|
|
|
Are there predefined images for toolbars and menu items that we can use ? A bit like the default ones that are used for default MFC application (save, load, ... )
For using in Managed C++ .net Forms application.
Thanks.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Look in the Common7\Graphics directory of your VS.NET installation directory. Use the bitmaps and set the mask to System.Drawing.Color.Silver .
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
I don't have that directory or anything looking like Graphics, the only images that I found were the ones in the different samples.
Anyway, for now, it's not that important, will change and/or use other custom made images.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
It was an option while you were setting up Visual Studio. You may want to change your setup options from Add/Remove Programs for Visual Studio and have them installed. They come in handy.
Another way is to use ildasm.exe to dump the IL and resources (everything in the assembly referenced in the assembly manifest) into a directory for the major assemblies like System.dll, System.Design.dll, System.Drawing.dll, and System.Windows.Forms.dll. There's a lot of goodies in there!
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
I'm trying to use a form I created in C# in a VC++ program I am creating. (Descriptive subject, no?) I have the C# compiling into a DLL and ... well that's about as far as I can get. I've done some reseach in the MSDN, and it shows how to use console classes, but nothing about how to use a form created in C#. I don't have the code on this computer, but the method I found I was trying last was using the following code (Close as I can 'member)
#using <mscordb.dll>//However main CLR dll is spelled.
#using "MyCSharpDLL.dll"
using namespace MyCSForm;//I tried it with and without this
//line and it didn't work either way, so I show it.
That's about where I get to. I also try to create an object of the class in the name space using either
MyForm Form1;
OR
MyCSForm::MyForm Form1;
Depending on if I use the "using namespace MyCSForm;" line or not.
I have also tried to using a slightly more complex method, one that is used to load functions from a DLL. I use that method to pull things out of a C++ dll that uses dllexport to say what comes out. That method can load the C# DLL but I can't figure out what I would be trying to load from it. Tried and failed to do the form, and main and even the namespace. None worked. At least I don't know how to get them to work.
Any help would be appreciated and if you have question I will answer them to the best of my abilities. And if I am going all wrong on how to load a DLL made in C# into C++, please point me in the right direction. Thanks.
Note: I'm sorry if I seem to be flooding the forum, but I'm not sure which of the three (Visual C++, Managed C++, C#) I am posting this in would be the best place for it. Since it deals with all three of them, I believe.
Thank you again for any help.
The wisest of the wise may err. - Aeschylus
I'm at home right now.
|
|
|
|
|
Do you want to use the C# form in MC++ or standard C++ application?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
This would be in a standard CV++ application.
The wisest of the wise may err. - Aeschylus
Codito Ergo Sum - (I code, therefor I am)
|
|
|
|
|
Then you can only use it as an "ActiveX" control, through the COM Callable Wrapper - CCW. There is MFC sample in the MSDN demonstrating using the WinForm as MFC View.
You can also read this MSDNMag artcle, which has a sample putting .NET control in MFC dialog.
You can use the Type Library Exporter tool (tlbexp.exe) to generate the type libraries or the other tools and classes provided by the .NET Framework.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Hi!
I'd like to use localized resources in my managed C++ project. The System that is available in e.g. C# (resx - localized satelite dlls) is exactly what I am looking for, so it would be nice to use it. However, vc++.net 2002 does not seem to support this natively. I can only add the "good ol'" .rc files.
How can I use resx files in my project? Do I have to write them manually, precompile them with resgen and then link them manually to my mc++ code?
Will VC++.net 2003 support resx-files natively?
Thanks in advance.
Andre (VizOne) Loker
|
|
|
|
|
VizOne wrote:
Will VC++.net 2003 support resx-files natively?
To tell the truth , the only serious MC++ project I am working on is only in VS.NET 2003. Due to problems in the VS.NET 2002, I moved quickly to the VS.NET 2003 before management could even decide
I cannot remember dealing with resource files under the VS.NET 2002, but with VS.NET 2003 the support is there even though not as straight as C# where you set it in the File Property Page. You have to use the Project property page to visually set the /ASSEMBLYRESOURCE flag for the file. You will get a list box, where you can list all the resource files.
In fact, you cannot do a complete .NET project without the commandline tools, whether in MC++ or C# - do not know if this will improve. So, make maximum use of the pre/post build process to set this once for your project where needed. Check the C# QuickStart tutorial on resources, it uses the commandline tools through the pre/post build options.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Hi Paul!
I solved my problems and (as you said) use the command line tools.
1. I add the resource files (resx and txt for strings) and the localized versions to the project.
2. For the neutral resource, I set
resgen $(InputFileName) $(InputName).resources
as the commandline and "$(InputName).resources" as the output file
3. For all localized resources I set the command line to e.g.
resgen $(InputFileName) $(InputName).resources
al /v:1.0.* /target:lib /embed:$(InputName).resources /culture:de /out:$(OutDir)/de/$(TargetName).resources.dll
and $(OutDir)/de/$(TargetName).resources.dll as the output file to create the satelite assemblies.
4. In the project settings Linker->Input->Embed managed resource file I add strings.resource
That's it, works sweetly for me, although it is not as easy as it could be. Why does MS stick to .rc/.res in VC++.net 2002?
- Andre
|
|
|
|
|
I have a managed C++ (windows.forms) application that needs to start unmanaged threads (real-time hardware stuff) that will run in the background until the application is terminated.
The interface commuication between the managed UI and the
unmanaged threads needs to be both ways with pointer references.
Is this possible? And how would it be done?
Thank you,
Della
|
|
|
|
|
Lets start this way, have ever programmed background thread in C++?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Yes, I have programmed background threads.
What's your point?
Thanks,
Della.
|
|
|
|
|
farnster wrote:
What's your point?
You should then have tried it with the case you are refering to and report any problem.
If you have never programmed a thread then you will need a startup code but having done it I see no reason why you should not try it first.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul, I bought the book "Advanced .NET Remoting" because of your review on Amazon, I'm only beginning to read it, and I just let you known that if I don't like the book, my reason to return it , will be that a fellow CPian played a trick on me
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech
|
|
|
|
|
I stand by my review and will write a new book for you if this does not make the grade
Anyway, welcome to the .NET Remoting - be prepared to answer my questions on the forum on .NET Remoting since I will be starting a project on this next 2 weeks.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
I want to write an MFC application that can be turned into the icon on task bar (like Norton Antivirus).
If it is Windows 9x/2000, the icon will appear next to the clocks at the right bottom of screen.
Thank you for your concern!
|
|
|
|
|
Please use the Visual C++ forum. This is MC++ forum.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
|
Can't remember
Anyway, we are trying to make sure any MC++ programmer here is satisfied and we cannot include non-MC++ stuff
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
If you see that it means that object could come from several sources. Use the required namespace to get the one you want. Read the build message (not the TODO) to get detailed information.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Hi, we're going to develop an ANSI compliant C++ module and portablility is a major concern: We want to deploy this module to MS/UNIX/LINUX. We need a good ANSI compliant XML parser that supports at least DOM/XPATH/dynamic navigation.. any suggestion?
I presume I can load XML file via stdio and perform any subsequent manipulation using this XML parser..?
.NET offers very good tool but it's not portable.
norm
|
|
|
|
|
Hello Norm,
Please use the Visual C++ forum, this forum is mainly MC++.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|