Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 08 Apr 2013
Offline Last Active Apr 15 2013 03:11 AM

Topics I've Started

weired situation between Direct3D9 and OCX.

08 April 2013 - 01:24 AM



I experienced strange things..


is there some problem with compatibility between OCX and DirectX or VB6?


I only created Device (LPDIRECT3DDEVICE9) with IDirect3D9::CreateDevice() in OCX code.


and then I added this ocx Control to my application made in VB6.


but some reason, return value of Now function was incorrect after CreateDevice() called.


and there is another situation with Delphi.


i added ocx Control to my application made in Delphi6. but the value of devision was strange too.


for example ,

when i calcurate 4/2 ,

result value is  2 without CreateDevice(), but 1.99999.. after CreateDevice() called.


is there any idea?


DirectX SDK version is 2010JUNE.

is there some problem with compatibility between OCX and DirectX or VB6?

do i need to downgrade directX SDK? like DirectX 9.0b.. or lower. Or source code has a problem?



 m_d3dpp.BackBufferWidth            = 100;
 m_d3dpp.BackBufferHeight           = 100;
 m_d3dpp.BackBufferFormat           = D3DFMT_X8R8G8B8;
 m_d3dpp.BackBufferCount            = 1;
 m_d3dpp.MultiSampleType            = D3DMULTISAMPLE_NONE;
 m_d3dpp.MultiSampleQuality         = 0;
 m_d3dpp.SwapEffect                 = D3DSWAPEFFECT_COPY;
 m_d3dpp.hDeviceWindow              = m_hwnd;
 m_d3dpp.Windowed                   = m_bWindowed;
 m_d3dpp.Flags                      = 0;
 m_d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
  m_d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE;




Thank you.