Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DirectX + (MFC or managed) C++

DirectX + (MFC or managed) C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++game-devdotnetwinformsgraphics
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    snir_ya
    wrote on last edited by
    #1

    Hi, We're currently implementing a game application using directX with MFC. We have came across the option to use windows forms (in C++) which will simplify the GUI dev. Since one of the requirements is to support Win2000 clients (estimated around 5% of the global PC market!) the trade off is the CLR redist package that we'll have to bring along. My questions are: did anybody wrote windows forms in c++ with DirectX? If so, what are the cons and pros? And in general is it a good idea to use managed c++ with directX. I'll appriciate judicious and experienced answers. Thanks in advance. Snir_ya.

    C M 2 Replies Last reply
    0
    • S snir_ya

      Hi, We're currently implementing a game application using directX with MFC. We have came across the option to use windows forms (in C++) which will simplify the GUI dev. Since one of the requirements is to support Win2000 clients (estimated around 5% of the global PC market!) the trade off is the CLR redist package that we'll have to bring along. My questions are: did anybody wrote windows forms in c++ with DirectX? If so, what are the cons and pros? And in general is it a good idea to use managed c++ with directX. I'll appriciate judicious and experienced answers. Thanks in advance. Snir_ya.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      There are several articles here on DirectX either with MFC and managed code. Try also to ask the guys of the C++/CLI forum. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      S 1 Reply Last reply
      0
      • C CPallini

        There are several articles here on DirectX either with MFC and managed code. Try also to ask the guys of the C++/CLI forum. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        S Offline
        S Offline
        snir_ya
        wrote on last edited by
        #3

        Thanks a lot mate.

        1 Reply Last reply
        0
        • S snir_ya

          Hi, We're currently implementing a game application using directX with MFC. We have came across the option to use windows forms (in C++) which will simplify the GUI dev. Since one of the requirements is to support Win2000 clients (estimated around 5% of the global PC market!) the trade off is the CLR redist package that we'll have to bring along. My questions are: did anybody wrote windows forms in c++ with DirectX? If so, what are the cons and pros? And in general is it a good idea to use managed c++ with directX. I'll appriciate judicious and experienced answers. Thanks in advance. Snir_ya.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          What part of forms on top of MFC simplifies your GUI development? It seems to me using MFC and forms only complicates things. If using MFC, can you use dialogs instead? If you want to go managed, have you looked at XNA? Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          S 1 Reply Last reply
          0
          • M Mark Salsbery

            What part of forms on top of MFC simplifies your GUI development? It seems to me using MFC and forms only complicates things. If using MFC, can you use dialogs instead? If you want to go managed, have you looked at XNA? Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            S Offline
            S Offline
            snir_ya
            wrote on last edited by
            #5

            Thanks for your answer Mark. I'm developing a casino application with a lobby as the main win. Selecting a game from the lobby menu opens the game in another window. You're saying i can open the game in a dialog. Does that make sense? Besides, i'm still perplexed by which windows architecture i should use. View/Document (MDI) or dialog based. These are critical issus that i'm facing right now. The directX requirement complicates things even further. I'll appriciate your advise. Thanks. Snir_ya.

            M 1 Reply Last reply
            0
            • S snir_ya

              Thanks for your answer Mark. I'm developing a casino application with a lobby as the main win. Selecting a game from the lobby menu opens the game in another window. You're saying i can open the game in a dialog. Does that make sense? Besides, i'm still perplexed by which windows architecture i should use. View/Document (MDI) or dialog based. These are critical issus that i'm facing right now. The directX requirement complicates things even further. I'll appriciate your advise. Thanks. Snir_ya.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              snir_ya wrote:

              You're saying i can open the game in a dialog. Does that make sense?

              It doesn't have to be a dialog - any window will work. I was just wondering why you thought forms would simplify this?

              snir_ya wrote:

              i'm still perplexed by which windows architecture i should use. View/Document (MDI) or dialog based

              You don't have to use either. Your application's main window can be any type of window. If the design of your application doesn't involve documents and views of those documents, then certainly don't use doc/view architecture.

              snir_ya wrote:

              The directX requirement complicates things even further

              In windowed mode, then the same issues as above apply. In fullscreen mode, you don't have to worry much about windows. If you want your game to work in both modes, then you'll need windows. I would recommend using the framework you (and your team if applicable) are most comfortable with, whether it's straight Win32 APIs, MFC, or .NET. They are still all valid solutions so using the one you're strongest in will probably yield the best end result. Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              S 1 Reply Last reply
              0
              • M Mark Salsbery

                snir_ya wrote:

                You're saying i can open the game in a dialog. Does that make sense?

                It doesn't have to be a dialog - any window will work. I was just wondering why you thought forms would simplify this?

                snir_ya wrote:

                i'm still perplexed by which windows architecture i should use. View/Document (MDI) or dialog based

                You don't have to use either. Your application's main window can be any type of window. If the design of your application doesn't involve documents and views of those documents, then certainly don't use doc/view architecture.

                snir_ya wrote:

                The directX requirement complicates things even further

                In windowed mode, then the same issues as above apply. In fullscreen mode, you don't have to worry much about windows. If you want your game to work in both modes, then you'll need windows. I would recommend using the framework you (and your team if applicable) are most comfortable with, whether it's straight Win32 APIs, MFC, or .NET. They are still all valid solutions so using the one you're strongest in will probably yield the best end result. Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                S Offline
                S Offline
                snir_ya
                wrote on last edited by
                #7

                Thanks again Mark. You're very helpful.

                Mark Salsbery wrote:

                In windowed mode, then the same issues as above apply. In fullscreen mode, you don't have to worry much about windows. If you want your game to work in both modes, then you'll need windows.

                What do you mean by "windowed mode"? we do intend to give the users the option to play in full/partial screen mode. So by "you'll need windows" are you refering to the obligation to use the doc/view windows architecture? Snir_ya.

                M 1 Reply Last reply
                0
                • S snir_ya

                  Thanks again Mark. You're very helpful.

                  Mark Salsbery wrote:

                  In windowed mode, then the same issues as above apply. In fullscreen mode, you don't have to worry much about windows. If you want your game to work in both modes, then you'll need windows.

                  What do you mean by "windowed mode"? we do intend to give the users the option to play in full/partial screen mode. So by "you'll need windows" are you refering to the obligation to use the doc/view windows architecture? Snir_ya.

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  snir_ya wrote:

                  What do you mean by "windowed mode"?

                  I meant the same thing as your "partial screen mode", where you host your Direct3D stuff in a window :) Again, you don't have to use doc/view architecture. For example, if using MFC, a CFrameWnd or even a CWnd is all you need. They're all windows - there's no need to complicate things with MFC stuff like doc/view if you're not using it. The windowing part should be the easy part, so you can focus on the game development :) Mark

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  S 1 Reply Last reply
                  0
                  • M Mark Salsbery

                    snir_ya wrote:

                    What do you mean by "windowed mode"?

                    I meant the same thing as your "partial screen mode", where you host your Direct3D stuff in a window :) Again, you don't have to use doc/view architecture. For example, if using MFC, a CFrameWnd or even a CWnd is all you need. They're all windows - there's no need to complicate things with MFC stuff like doc/view if you're not using it. The windowing part should be the easy part, so you can focus on the game development :) Mark

                    Mark Salsbery Microsoft MVP - Visual C++ :java:

                    S Offline
                    S Offline
                    snir_ya
                    wrote on last edited by
                    #9

                    Great. It's all clear now. Many thanks ;) Snir_ya.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups