Skip to content

Managed C++/CLI

Discussions on Managed Extensions for Visual C++ .NET

This category can be followed from the open social web via the handle managed-c-cli@forum.codeproject.com

4.4k Topics 14.9k Posts
  • UserControl using Man C++

    c++ question
    2
    0 Votes
    2 Posts
    7 Views
    N
    Firoz wrote: Is it possible to create a UserControl in Managed C++? Yes, it is possible! Firoz wrote: Can someone please tell me the Steps. Take a look at The MFC unclickable button ported to Managed C++ by Chris M and Nish (moi) :-) Regards, Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • Managed C++???

    question csharp c++
    4
    0 Votes
    4 Posts
    9 Views
    P
    Reverend Stan wrote: My feeling is that anyone who can't do that is simply going to find some other way to screw up an application even with the CLR holding their hand LOL well to be honest, without MC++, the app I am writing would have tanked my computer countless times with un-managed memory "leaks" :-D I am so used to the VB and even the C# way of declare, use and forget. Lets hope my MC++ app is not screwed up in some other way huh? ;) regards, Paul Watson Bluegrass Cape Town, South Africa The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge Alison Pentland wrote: I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
  • Opinion on possible architecture

    c++ csharp dotnet com sysadmin
    4
    0 Votes
    4 Posts
    9 Views
    P
    It is going to serve a couple of purposes, firstly give me more experience developing a proper software application (as opposed to programming/software development theory that I've covered at Uni. Originally, the idea for the application came from my Uncle, who wanted to do something, but didn't know of any existing software package that would do what he needed -- so I took it up as a bit of a part-time project. I'd imagine that the majority of the code would be unmanaged, and ideally I'd just go with MFC and ATL. However, developing COM servers in ATL appears a little daunting, so I thought about delving into Managed C++. I prefer the UI functionality in MFC, as well as the stricter Doc/View architecture. However, the .NET framework encompasses all the "other stuff" pretty well (from what I've seen through developing the odd C# app and ASP.NET app), so it seems an ideal solution. All I've got to do now is pick up a copy of VS :)
  • CMapStringToString equivalent?

    csharp html com question
    4
    0 Votes
    4 Posts
    11 Views
    C
    Nishant S wrote: Huh? Nope! I won't cater to your STL-is-better-than-MFC whims! No way!!! That's fine, I guess someone has to be stuck with doing things the hard and ugly way :-) Nishant S wrote: Anyway thanks for that tip on dictionary objects. Glad to help - I spent some time last night implimenting a typed dictionary if XmlNodes to paths and values, so it was perfect timing. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
  • XMLTextWriter, Files and a Class Library

    csharp c++ com regex xml
    2
    0 Votes
    2 Posts
    6 Views
    N
    Hi Paul, Create an MC++ console test-app and put the same code into it and see if it works from there. It's prolly easier to debug too. Regards, Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • AfxOleInit, Rama and a puzzle!

    html com hosting question
    3
    0 Votes
    3 Posts
    7 Views
    N
    Rama Krishna wrote: AfxEnableControlContainer is automatically called by CHtmlView so it is not necessary. But still it is a good practice to have it in the InitInstance Yes, in fact I did not add it myself. The app wiz had put it there for me. Rama Krishna wrote: MFC requires AfxOleInit in order for control containment to work and I am surprised to see that in VS.NET it is automatically called during CreateControl I had looked at the different overloads of CWnd::CreateControl but had not found any call to AfxOleInit, but just now I found that COleControlSite::CreateControl does indeed call AfxOleInit Rama Krishna wrote: Now to the actual answer. Brilliant!!! Thanks :-) Regards, Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • Forcing GC

    help question c++ html dotnet
    17
    0 Votes
    17 Posts
    40 Views
    N
    Rama Krishna wrote: Instead of speculating over and over, it will be useful if you add those two lines of code and see whether stuff works. Yeah, I added them and it works now :-O Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • MC++ and Consuming a Web Service

    help csharp c++ visual-studio com
    6
    0 Votes
    6 Posts
    19 Views
    P
    Nishant S wrote: I hope some of my MC++ intro articles were useful Most definitley Nish. You are a great editor and article writer. You should check the messages on your articles, I posted one (the MC++ intro that that one idiot wrote that nasty post on.) Nishant S wrote: Cool! I am submitting one too Ahh damn, and here I was hoping I was going to win, and then you come along. Dang, going to have to settle for second place I guess. regards, Paul Watson Bluegrass Cape Town, South Africa The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge Alison Pentland wrote: I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
  • Problem setting breakpoints

    debugging c++ html dotnet com
    2
    0 Votes
    2 Posts
    6 Views
    N
    Er, ignore that post. I had set debug info to disabled :-O Nish :-O Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • GetModuleFileName equivalent?

    html com hosting question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Palm Os programming

    question
    6
    0 Votes
    6 Posts
    16 Views
    I
    I don't think that's what the lounge is for.
  • Weird warning when using gcroot

    html com hosting
    5
    0 Votes
    5 Posts
    16 Views
    N
    Hello Rama/James It's a well know bug it seems. It happens when you use gcroot in an MFC application compiled with /clr. See this reply from a Microsoft guy in reply to a similar question that got asked in the dotnet mailing list. From: "Mark Hall (VC++)" markhall@MICROSOFT.COM Subject: Re: gcroot template with warning C4244? This is a mismatch between the way the GCHandle class is defined and the way C++ implements the -Wp64 warnings. In short, intptr_t and System::IntPtr were not recognized as fully compatible. This will be fixed in the next release. Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • How to wrap lines?

    c++ html com hosting help
    3
    0 Votes
    3 Posts
    7 Views
    C
    Don't ya hate it when that happens. Regardz Colin J Davies Sonork ID 100.9197:Colin I am sick of fighting with Martin, I think I will ignore his posts from here on in, and spend the time working on articles instead. Christian Graus
  • Design issue - OleDbConnection

    html database com design sysadmin
    5
    0 Votes
    5 Posts
    13 Views
    N
    It's not about bad design here Alex. I don't have a choice here. A remote client may do what it wants to. We cannot dictate to it to close after a minimum while :-( I like your periodic flush idea. I'll do that. And yeah, I'll take a look at your Dataset article too :-) Thanks Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • OleDbCommand - peculiar issue

    csharp c++ html database com
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Multiple objects? Or one BIG object? A design question!

    question csharp c++ html com
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Marshaling an interface between threads in a process

    tutorial csharp com help
    3
    0 Votes
    3 Posts
    10 Views
    M
    That's right. :) I found the answer in the .Net SDK. But there is one requirement - both threads must be in the STA apartment, otherwise the function call on the interface will fail. 43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c
  • Copy a CString to a Stream*

    help question
    5
    0 Votes
    5 Posts
    11 Views
    A
    Thanks. This really looks like a solution. Best regards, Alexandru Savescu
  • Excel format IO

    c++ regex question workspace
    2
    0 Votes
    2 Posts
    6 Views
    C
    It's very hard, to say, but try here Regards Carlos Antollini. Sonork ID 100.10529 cantollini
  • Runtime files

    csharp c++
    4
    0 Votes
    4 Posts
    11 Views
    N
    Well 20 Mb is not so bad given that it does a LOT! And in newer versions of the MS Operating Systems, they'd have the runtime by default! Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]