   Game Loop in MFC
  I have a D3D activex control using MFC and currently using OnIdle for update. As it seems not the good aproach, so what will be the best option to implement a game loop in this case? I came across this article, Continuous Updating in MFC is it sufficient for the purpose or there's more?Please elaborate in detail. Thanks.   
  Hmmm. I've just taken a look, and I don't think it's possible. Thing is, when I wrote that article, I was targeting MFC Win32 applications. You can override CWinApp::Run just fine, but that's because CWinApp is derived from CWinThread (ie. it gets called every cycle). The COleControl class, on the other hand, isn't derived from CWinThread, it's derived from CWnd. That means you can't use the technique in my article there because CWnd is completely event-driven. To put it another way, any program which uses your ActiveX control would have to specifically update it every cycle. And I don't think you can do that with an ActiveX control. I think they're event-driven, so you'll have to stick with the OnIdle messages. I could be wrong, though; I've never written an MFC ActiveX control doing what you're doing.   