apiGetDeviceCaps(hDCref, HORZSIZE) returns 0

  • Thread starter Thread starter thomas
  • Start date Start date
T

thomas

Hi folk!

I am using an api function (from www.lebans.com) to show images in an
access form and on one PC apiGetDeviceCaps(hDCref, HORZSIZE) returns 0
which result in a divide by 0 later on.
The same application works on 20 other PC's. In this special case there
is a beamer and a monitor connected to the pc but I have also other
machines running with 2 monitors which work correct.
Could it be a bug of the ATI driver (newest installed) cause the other
machines running dual configurations have nvidia quadro cards.

' Let's grab the current size and resolution of our Screen DC.
sngHORZRES = apiGetDeviceCaps(hDCref, HORZRES)
sngVERTRES = apiGetDeviceCaps(hDCref, VERTRES)
sngHORZSIZE = apiGetDeviceCaps(hDCref, HORZSIZE)
sngVERTSIZE = apiGetDeviceCaps(hDCref, VERTSIZE)

Thanks for any Help

Thomas
 
The only way to tell if it is a driver issue is to swap drivers
temporarily.
Regardless, just check for a ZERo value and substitute a default if
equal to 0.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Hi Stephen !

Thought you would be the only who could help ;)!
Yes its throughs no error when I remove the catalyst driver but then I
have no support for two monitors. The system is used to present 3D Data
from Catia, Magics (Dell Precision with ATI fire)and cant run with the
default windows driver.
I have two ideas which I will try today:
Switching the LCD from secondary to primary monitor (now beamer is
primary)
and what you suggest - setting default values for HORZSIZE and
VERTSIZE.

Thanks for your help. Your website has been several times my lifesaver
!

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top