Jump to content
  • Advertisement
Sign in to follow this  
ziyunCn

How to use DirectX9.0 in MFC

This topic is 3933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to make a map editor like the mapEditor of "Heroes of Might and Magic V", of course, mine is very simple. I know how to program with DirectX and MFC separately, but I can't combine them. who can give me some resource or web link about it? my e-mail: hardcyj@163.com thanks everyone~

Share this post


Link to post
Share on other sites
Advertisement
First sample is at the code project's website

A beginning DirectX application using MFC
http://www.codeproject.com/KB/directx/Modeler.aspx

Second sample is writern by akira32. This is my advanced computer graphcis's homework about Sierpinski.

http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/%e5%85%ac%e9%96%8b/u69521019-Akira-A01.zip

Only two key points:
1.pass the MFC's hWnd to DirectX
2.in CApp:OnIdle to call the FrameRender of DirectX

PS:Could you show the screenshot of the mapeditor of "Heroes of Might and Magic V"? I am very interest in the mapeditor of 3d game.

Share this post


Link to post
Share on other sites
thank you very much!

I have got the screenshot, but I don't know how to post it here -_-!
Could you give me your email? I will send it to you. Or you can teach me how to show picture here...

Share this post


Link to post
Share on other sites
You can upload the screenshots to the web of http://rapidshare.com/ and write down the link.
This game is PC Game or TV Game?

Share this post


Link to post
Share on other sites
I have uploaded it:)
Link: http://rapidshare.com/files/97453965/Snap1.bmp.html
It's a PC Game made by ubisoft. You can find more at http://www.ubi.com/US/Games/Info.aspx?pId=4174

Share this post


Link to post
Share on other sites
You should save as jpeg file,because it will be more small and keep the same quality.
You can use vc++ 2005 to design the mapeditor.
First,Create MFC Application Project.
Application type select the Single document.
The Menu and Toolbar and Statusbar should be easy and popular to learn for you.
There are many MFC books talk about the designs of Menu and Toolbar.
There is key point is that to "split view".
I had write the code about split view to be three.
I am glad to give my complete code about split-view to you as below:
http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/%e5%85%ac%e9%96%8b/00split3%20-treeview-SSplit.rar

You also can get some sample code in Code Project(http://www.codeproject.com/).

Three views:
Top:Menu & Toolbar
Left:TreeView(but it is not traditional treeview, it seem to add a title call Property at the top of treeview and add the editcontrol at the bottom of treeview )
Mid:MainView for rendering and operation
Right:PropertySheet(I never use it in view,but I had seen it in Code Project's MFC sample code)
Bottom: Statusbar

That is I guess, not all right. Give you some may useful suggestions.

My Game Map Editor is writen by my self at home by using DirectX7 at long time ago. But I used other game's picture, so I cannot give you.
http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/%e5%85%ac%e9%96%8b/atalasi-MapEditor.JPG

Share this post


Link to post
Share on other sites
oh, I'm so sorry. Next time, I will pay attention to the format.
Thank you for the suggestion, it's very useful.

ps: taiwan, province of china. yes, very good:)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!