CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Location
    Visual Studio 2005, .net 2.0
    Posts
    18

    [RESOLVED] [.net 2.0] Visual C# Equivalent of CWnd

    Preface -- I'm a C# novice so some of my terminology might be incorrect here.

    Does C# have an equivalent of MFC's CWnd? Several of the functions I want to perform I need to do via calls the win api functions. It seems that some win api functions were built into CWnd. If C# has an equivalent I would prefer to use that.

    Thanks. Any insight is appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: [.net 2.0] Visual C# Equivalent of CWnd

    Quote Originally Posted by Evets23 View Post
    Preface -- I'm a C# novice so some of my terminology might be incorrect here.

    Does C# have an equivalent of MFC's CWnd? Several of the functions I want to perform I need to do via calls the win api functions. It seems that some win api functions were built into CWnd. If C# has an equivalent I would prefer to use that.

    Thanks. Any insight is appreciated.
    C# and MFC are totally different things. There is no use of MFC in C# But the Form we are using in C# ( which have some similarity to old VB forms ) have a lot of Properties and methods so if you would define what you are wanting to do, maybe we can give you some hints how to design it in C#.
    Best way to start with C# is
    1) Forget all what you have done in C++
    2) Take an easy book about C# and go through all this chapters
    this will bring you a totally new viewpoint of designing an
    application, events, generics, interfaces, ...
    The approach to do things is totally different.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  3. #3
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: [.net 2.0] Visual C# Equivalent of CWnd

    Although in C++ onw would use CWnd to create a Windows form, in C# the concept is little different. We have Forms in .NET world, so you would want to see how Windows Applications are built in C# on MSDN.

  4. #4
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: [.net 2.0] Visual C# Equivalent of CWnd

    The simplest way to see how this is done in C# is to use VS 2005 or 2008 and create a new WindowsFprms Application. The first Form is done for you and you can change it for example to an MDI Form by simple changing the properties.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  5. #5
    Join Date
    Mar 2009
    Location
    Visual Studio 2005, .net 2.0
    Posts
    18

    Re: [.net 2.0] Visual C# Equivalent of CWnd

    Hi Suja and Jonny,

    Thanks for the insight. I think I'll buy a book.

    Kind regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured