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

DX + MFC + ActiveX problems

This topic is 5503 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! I am bound to using MFC because I have to use ActiveX. So far I was very unsuccessfull in a simple task of showing two bitmaps on the screen while using VC++ and an MFC application. It all works fine and dandy with WinMain and such but as soon as I touch MFC I either get crashes left and right or nothing showing. I looked at tons of source on the net and nothing seems to work! What I''m trying to do in MFC is the following: I have first window with a couple of buttons, one is exit one is go, when you press go I just want two BMPs on the screen, I ported EXACT same code as I used in my WinMain program except for HWND I get this way: ghWnd = AfxGetMainWnd()->GetSafeHwnd(); and then I initialize DD and do everything else. This way doesn''t work for some reason and I don''t get any pictures on the screen, just a blank window screen. If anyone here has any experience using MFC and DX for a very simple task of showing pictures on the screen please reply here or write me at thank you!

Share this post

Link to post
Share on other sites