3 Replies - 1490 Views - Last Post: 02 February 2011 - 04:06 PM

#1 sk8ermeb  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 111
  • Joined: 23-March 10

c++ gui

Posted 02 February 2011 - 03:49 PM

Ok so I am new toi c++, I have written plenty of c and embedded c as well as java and c# guis. I am trying to figure out how to write a gui in c++ and it appears to be 2 ways:
1 WINAPI and unmanaged code
2 Managed .net where you basically import the dll's and its the same as c# (more or less)

What is the standard? Is the WIN API out of date? If so how do you write managed code in c++? I have read several tutorials, butI cant seem to find how you actually declare a class managed?

#using <System.dll>
#using <System.Windows.Forms.dll>
class MyWindow : public System::Windows::Forms::Form
{
   Public MyWindow()
   {
   }
}


generates :
error C3625: 'MyWindow': an unmanaged type cannot derive from a managed type 'System::Windows::Forms::Form'

Is This A Good Question/Topic? 0
  • +

Replies To: c++ gui

#2 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: c++ gui

Posted 02 February 2011 - 03:59 PM

there isn't a standard, you either use your OS's gui system, make you own by use you OS's canvas, or you use a library like QT, xwWidgets, or GTX.

edit: also that code you have is not C++, mabey it's CLI C++ but it's not C++. CLI C++ would be the manged C++ you referred to. if you want to use CLI C++ then we have a forum for that. if you would like to ask a question about CLI C++ then tell me and i can just move the thread.

This post has been edited by ishkabible: 02 February 2011 - 04:01 PM

Was This Post Helpful? 1
  • +
  • -

#3 sk8ermeb  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 111
  • Joined: 23-March 10

Re: c++ gui

Posted 02 February 2011 - 04:03 PM

Thanks then I will atick with the .net since I know it. So can anyone point me in the write direction of how I call managed .net from unmanaged code, or how to write managed code I have looked at the MSDN and other tutorials but I cant seem to find a creal example. Thanks
Was This Post Helpful? 0
  • +
  • -

#4 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: c++ gui

Posted 02 February 2011 - 04:06 PM

look up CLI C++, it comes with MSVC++. im also moving this to CLI C++ becuase you want to write manged code.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1