• Welcome to Valhalla Legends Archive.
 

SetLayeredWindowAttributes

Started by brew, August 10, 2007, 01:22 AM

Previous topic - Next topic

Warrior

Quote from: brew on August 11, 2007, 07:12 PM
Quote from: Kp on August 11, 2007, 12:58 PM
Also, your code is badly outdated.  You are calling the ANSI version of the function, and you are using SetWindowLong (which takes a LONG (always 32 bits)) when you are using a pointer (may not always be 32 bits).  Your code will break on Win64.
I don't intend my code to ever be run on a win64 platform. If someone does run it, and it breaks, then OH WELL, thats their own fault. Not like my battle.net chatterbot is going to be the next firefox or something.

I'm sure had this been a more important problem you would of known this as well right? Right? Wrong.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

l)ragon

Quote from: Kp on August 11, 2007, 12:58 PM
Yes, the result of SetWindowLong will fit into the variable, but you are storing it into a variable of a different type than SetWindowLong returns.  The compiler is trying to keep you from making a mistake by refusing to silently change the type.  In this case, the programmer can recognize that he wants to store the result anyway, and override the compiler with a simple typecast.

Also, your code is badly outdated.  You are calling the ANSI version of the function, and you are using SetWindowLong (which takes a LONG (always 32 bits)) when you are using a pointer (may not always be 32 bits).  Your code will break on Win64.
Thought that the 64bit versions of windows had the backward compatability mode for people who were, or are to ignorant to conform to the 64bit systems?
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Kp

Quote from: l)ragon on August 12, 2007, 03:55 AM
Thought that the 64bit versions of windows had the backward compatability mode for people who were, or are to ignorant to conform to the 64bit systems?

Yes, that is true.  However, there are some things which work differently or do not work when you are running in compatibility mode.  Therefore, all new programs should be written in such a way that they can be compiled for native 64bit mode, rather than relying on the compatibility layer.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!