- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to be able to intercept and process F1 help messages WM_COMMAND ID_HELP when menu items in a QuickWin application are selected. To do this I need to change the window procedure.
I should be able to do this using SetWindowLong (to change the window procedure) and CallWindowProc to send messages to the original default procedure (handle obtained using GetWindowLong).
However, the documentation refers to
"Reserv[ing] extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASS structure used with the RegisterClass function".
Since the QuickWin window was set up without my being able to do this, does this mean that any attempt to do what I want will fail because of failure to alot extra memory?
I should be able to do this using SetWindowLong (to change the window procedure) and CallWindowProc to send messages to the original default procedure (handle obtained using GetWindowLong).
However, the documentation refers to
"Reserv[ing] extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASS structure used with the RegisterClass function".
Since the QuickWin window was set up without my being able to do this, does this mean that any attempt to do what I want will fail because of failure to alot extra memory?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That sentence in the documentation has nothing special to do with subclassing; it refers to the situation when you want some application-specific data to be allocated and associtated with the window in order to avoit global data (i.e when nIndex argument is not one of predefined ones). It's connected with the sentence from the beginning of the doc on GetWindowLong:
Specifies the zero-based offset to the value to be retrieved. Valid values are in the range zero through the number of bytes of extra window memory, minus four; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value, specify one of the following values:...
Subclassing of QW windows works quite fine without any messing with cbWndExtra -- just use global data instead of this memory area.
Jugoslav
Specifies the zero-based offset to the value to be retrieved. Valid values are in the range zero through the number of bytes of extra window memory, minus four; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value, specify one of the following values:...
Subclassing of QW windows works quite fine without any messing with cbWndExtra -- just use global data instead of this memory area.
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page