Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetWindowLong and GWL_WNDPROC in Win2k

Status
Not open for further replies.

NipsMG

Programmer
Dec 27, 2000
215
US
Hi everyone..

I've recently switched my development machine from Win98 to Win2k.

Since doing so, however, I have been having LARGE amouts of trouble subclassing window messages. I consistantly get return values of 0 every time I try to get or set the window procedure of any window outside the development environment.

Upon reading the MSDN Library's entry for SetWindowLong w/ GWL_WNDPROC I found this:

Windows NT/2000: You cannot change this attribute if the window does not belong to the same process as the calling thread.

However, in MSDN Library's entry for SetWindowLongPtr, it does not specify this restriction next to GWLP_WNDPROC.

In MSDN Library, it says GetWindowLongPointer and its constants are declared in WinUser.h, however, after opening WinUser.h and looking for the Declarations, I was unable to find them.

(I'm using MS VS6 SP3).

Does anyone know:
A.) If using SetWindowLongPtr and GWLP_WNDPROC will get and set window procedures where SetWindowLong and GWL_WNDPROC will not.. And
B.) What the declarations are of SetWindowLongPtr, GetWindowLongPtr and the values for any GWLP_ constants?

Thanks, I appreacate all your help.. :)

--Michael P. Gerety
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top