Jump to content
  • Advertisement
Sign in to follow this  
Ohmy

Problems with my code

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

There are some certain functions like setwindowlong e.t.c.. pure windows api functions i use in my code. When i run this in 98 it's draws things in the wrong places or, for some reason or the other react differently than it does on NT platform's like XP/2000 and the rest. Has anyone every expierenced this? And*, what do you do to resolve this?

Share this post


Link to post
Share on other sites
Advertisement
(this is not an answer - just an observation)

It is almost definitely a compatibility issue betweens OSs, and a lot of commerical stuff, I've seen, has different versions, each suited for either NT/XP or other.

In all honesty, not that many people run older systems (I do), so it may not matter that much. I'm off to check MSDN to see if I can find you any help there.

EDIT:

Well, it appears that CWindow::setwindowlong is overloaded; and one of the functions is newer than the other.
LONG SetWindowLong( 
int nIndex,
LONG dwNewLong );

Is the new one. I'm guessing this is what's causing the problem. If I'm right, then you need to use the old one for backwards compatibility:
LONG SetWindowLong( 
HWND hWnd,
int nIndex,
LONG dwNewLong
);

Share this post


Link to post
Share on other sites
Sometimes the core API values and/or behaviors change between Windows versions. Usually this is all well documented at msdn.microsoft.com although there are occasionally some errors there. Worst case you can google the specific window attribute constants (or whatever) and find version-specific behaviors fairly easily.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!