PROP:WndProc on multiple windows

Using PROP:WndProc on a main frame, subclassing procs are working fine, moved one of the subclass procedures to a SDI window and its crashes on the Return CallWindowProc in the subclass proc.

Here CallWindowProcA function (winuser.h) - Win32 apps | Microsoft Learn

“Usually, all windows with the same class share one window procedure. A subclass is a window or set of windows with the same class whose messages are intercepted and processed by another window procedure (or procedures) before being passed to the window procedure of the class.”

The Clarion Windows have the ClaWin0400000H_ ie a different class name for each window, havent checked if the is a thread count or window count, so to me the MS docs are suggesting this shouldnt apply.

Can PROP:WndProc be used on multiple windows?

Procedure variables used to store the window and subclass proc address and not global variables.

Fixed. Perfect for a template to avoid that mistake because the procedure addresses and subclass procedure addresses will be at a global level in the EXE, and whilst the example uses a global, its just not emphasised that the variables holding the procedure addresses need to be global and not local.

Its surprising how external stress can destroy a persons ability to work properly.