Archived

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

revearz

DirectX/MFC repaint problems

Recommended Posts

Hello, My DirectX app (MFC dialog based) does not repaint whenever I click a menu or pop up a dialog. What should I do to change this? This app was created using the DirectX app wizard. Thanks.

Share this post


Link to post
Share on other sites
After a bit of debugging, I noticed that the MFC/DirectX app created by the appwizard does not call CD3DApplication::MsgProc(...). Is there any way to force my application to call this function. If so, where would I call this function from. Thanks.

Share this post


Link to post
Share on other sites
just as a side note (i don''t think this is your problem) but i had MAJOR problems in the WM_PAINT handler. WM_ERASEBCKGND (or something similar to that) was exactly what i expected WM_PAINT to do (be called whenever it was required to draw)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmm, the CD3DApplication::MsgProc(..) is never called in the DirectX MFC based app ... It does some useful stuff like pausing the timer when you click a menu, etc. How do I make sure this function is called whenever there''s a message?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hello,

Even if I create a new MFC DirectX app using Visual C++ Appwizard, the problem occurs. The only place I could find where messages are handled is:

LRESULT CAppForm::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
return CFormView ::WindowProc(message, wParam, lParam);
}

But this does not call CD3DApplication::MsgProc(..).

Share this post


Link to post
Share on other sites