A much needed editorial -snip-
>>>
>>>George,
>>>I'm not getting a zero for the instance handle anymore......
>>>But is it normal for an instance handle to be such a large number..... 805306368
>>>
>>>Thanks,
>>>Tony
>>
>>Tony,
>>
>>My gut reaction is not to worry about it. It is an integer and it wasn't zero (which would mean there was an error). If you're trying to get a device context or something like that, if there's a problem with the value, then I'd be concerned. Quite frankly, as long as the function doesn't indicate an error, I don't worry about what the actual value is.
>>
>>George
>
>
>George,
>I agree..... But I'm still getting 127 when I issue GetLastError after GetClassLong
>Where can I find a list of the error codes returned by GetLastError?
>
>Thanks,
>Tony
Tony,
If you call GetLastError after you get a valid instance hand it may very well retrurn 127. However, it only needs to be called when GetClassLong returns 0. In that case, calling GetLastError will return the reason GetClassLong didn't return a valid instance handle.
George
George
Ubi caritas et amor, deus ibi est