-
Type Mismatch using API
I really don't understand this error. I get a Type Mismatch when trying to call GetWindowLong(). It's declared as Long and the value I'm assigning it too is Long. I don't see how it could be returning something larger than a Long. Any help would be greatly appreciated.
-
The declaration for GetWindowLong is like this:
long = GetWindowLong(ByVal long, ByVal Long)
It is pushing 32bits on to the stack for each parameter.
The first parameter is a handle for a window, the second is a constant value like GWL_STYLE. Check your const statement
it should look like
Code:
const ES_WHATEVER = &HF01&
with the ampersands. VB 6.0 IDE makes it &HF01, which is ok.
You can force it to long like
Code:
const ES_SOMETHING As Long = (-16)