>>>>>>>Does anyone have experience with using the GetWindowWord funtion which is contained in the windows USER32.DLL?
>>>>>>>
>>>>>>>Is it normal for this function to return a value of 0?
>>>>>>
>>>>>>Tony,
>>>>>>
>>>>>>What are you trying to do? Zero indicates an error has occurred. Use GetLastError() to get the value of the error. If you're trying to retrieve information about the window under Win 32, you should use GetWindowLong.
>>>>>>
>>>>>>hth,
>>>>>>
>>>>>>George
>>>>>
>>>>>George,
>>>>>
>>>>>Thanks I am getting an error code of 127.....
>>>>>I am able to get the Window Handle but can't seem to convert it to the Window Instance......
>>>>>Any Suggestions????
>>>>>
>>>>>Thanks,
>>>>
>>>>Do you mean the Instance Handle? If so, try GetClassLong(). Pass it the window handle and -16 (GCL_MODULE, I think is the constant definition).
>>>>
>>>>hth,
>>>>
>>>>George
>>>
>>>
>>>George,
>>>
>>>The following is a sample of the code..... I'm still getting error code 127
>>>
>>>Declare long GetClassLong in Win32API ;
>>> long @, ;
>>> long @
>>>
>>>ghInstance = GetClassLong(hwnd, -16)
>>
>>Tony,
>>
>>From the error (ERROR_PROC_NOT_FOUND) I think that the problem is probably the result of it not finding the window handle you're passing. This is the same as it was before. So the question becomes, what's the source of the window handle? Once you get that straighten out it should work fine.
>>
>>George
>
>
>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
Ubi caritas et amor, deus ibi est