Jump to content

  • Log In with Google      Sign In   
  • Create Account

directx and mfc


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Psylocybe   Members   -  Reputation: 130

Like
Likes
Like

Posted 10 July 2001 - 09:36 PM

I''m learning mfc programming and I''m wondering how does directx and mfc work together? Would you typically create a window manually as in deriving a class from CWnd or from CFrameWnd or would you use the document/view architecture? I imagine I will get a reply saying you can use all three or maybe something I dont even know about, but if so which one would generally be used? I''m just curious how they work together.

Sponsor:

#2 deadlinegrunt   Members   -  Reputation: 123

Like
Likes
Like

Posted 10 July 2001 - 09:51 PM

Unless you are making a tool there really isn't a justification to use MFC with DirectX, but it can be done.

You can use CWnd directly or any classes derived from it as well as a dialog based or even a full blown MFC Document/View SDI/MDI application. Really it depends on how you partition your code. It's all going to boil down to connecting to a window. How easy or hard you make it is up to you...

YAP-YFIO
-deadlinegrunt

P.S. This is geared more towards graphics as that seems what a lot of people take on first and your mention of CWnd. This isn't to say that you can't use other parts of DirectX with an MFC application, like an audio/video editor for example, and it be completely justified but this is a game programming site so keep that in mind if my response seems narrow and simple minded.

Edited by - deadlinegrunt on July 11, 2001 4:57:42 AM

#3 draqza   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 July 2001 - 07:52 AM

There are some MFC wrapper classes for DirectX functions somewhere, but I''m sorry to say I can''t remember where I saw them. Probably search on Yahoo! or MSDN to find them.
--



WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);


Unable to register Reality...what''s wrong?
---------
Dan Upton
Lead Designer
WolfHeart Software


#4 Erebus   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 July 2001 - 05:55 AM

I recently posted a similar question on another programming site; one not focused on games. The response I got there was that MFC is fine for utilities and stuff like that, but for games its really slow. Since I don''t know anything about programming with DX I can''t tell you how to use them together, but the advice I''ve recieved has that you can, but you shouldn''t. Good luck.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS