   MFC with DirectX
  I am experimenting with DirectX 9 within an MFC application. I am using a wizard generated application from VC 6. The application is SDI application with DirectX support. The render view is an MFC picturebox control.  I have loaded my own meshes in it. What I want now is to be able to pick object on mouse click, but I am having trouble with mouse input. apparently the MsgProc function of the CD3DApplication class is never invoked on input. I tried the same approach in a wizard generated with Win32 support and it was working fine. I'll appreciate any help. Thanks.   
  First, I'd recommend getting rid of MFC and VC6 - that compiler is over 10 years old and came out before the first C++ standard. That also means that you must be using a very out of date DirectX SDK (ISTR that the latest DirectX SDK that works with VC6 is December 2000).As for the actual question, are you mixing the D3D sample code (CD3DApplication) and the MFC template application? I can't really see that ending well [smile].It's been a long time since I did anything with MFC, but your document or view (I forget which, maybe both) should get the mouse clicks, which you can then pass through to your picking code.   