Sign in to follow this  
Ohmy

Problems with my code

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
(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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this