Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

SetWindowLong API function

cobek
Beginner
913 Views
Can anyone explain me what is the purpose of this function?
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
913 Views
It changes certain properties of the window identified by Windows handle hWnd. Most frequently used flags are:

- GWL_STYLE, GWL_EXSTYLE -- changes window styles, such as border, caption, child/popup etc. See CreateWindow(Ex)entries for full list.
- GWL_WNDPROC -- changes the window procedure -- the function which handles all the messages for the window. This technique is called "subclassing". See POKER sample for illustration.
- GWL_USERDATA -- associates (a pointer to) arbitrary data with the given window. This provides some kind of OOP. For example, in a MDI application, you can associate your own data structure which will keep its contents with every open child window; behaviour (window procedure) of all windows is the same, but data displayed in them are different.

Jugoslav
0 Kudos
Reply