Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Bashar

MFC and DirectX???

This topic is 6452 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

Hi all! Just wondering, is there some hidden rule or something about mixing MFC aand DirectX? I tried to make a simple Dialog-based MFC app, with a button. And with the whenclickedon event for the button, I initialize DirectDraw and... well, DirectX will NOT start! Am I missing something, or what? I was just hoping to make a quick GUI with MFC... anybody know what''s up?

Share this post


Link to post
Share on other sites
Advertisement

Thanks for your reply Buster!

Next time maybe you should keep your lame a$$ remarks to yourself...I''d appreciate that.

so, can anyone help me out?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1. Add a CStatic component (rect,bitmap whatever) to dialog.
2. Use GetDlgItem(IDC_STATIC)->GetSafeHwnd() as hwnd for initializing directx.
Hope this work!

Share this post


Link to post
Share on other sites

Thanks Anonymous poster, but I tried what you said, with Static label component...but when I went to run it, I got an invalid page fault.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!