Jump to content
  • Advertisement
Sign in to follow this  
Hana Lee

weired situation between Direct3D9 and OCX.

This topic is 1874 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



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.

Edited by SunkistOrange

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!