WM_DDE_INITIATE not forwarded by DefSubclassProc to 32-bit ANSI window procedure

Christophe Carron 0 Reputation points
2026-11-23T17:35:56.63+00:00

On Windows 11 25H2 build 26200.9974, a controlled test with two 32-bit ANSI windows shows different handling of WM_DDE_INITIATE when SetWindowSubclass is used.

Reproduction: Create two otherwise equivalent ANSI windows in a 32-bit process and subclass one using SetWindowSubclass. Send WM_DDE_INITIATE to both and forward it from the subclass procedure using DefSubclassProc. Compare the messages received by the original window procedures.

Observed: The original procedure of the non-subclassed window receives WM_DDE_INITIATE. The subclass procedure of the other window receives it, but its original procedure does not receive it after DefSubclassProc. A control message reaches both original procedures. The reproduction used comctl32 5.82, file version 26100.8521.

Expected: DefSubclassProc should pass the message to the next subclass procedure or the original window procedure.

Impact: Delphi 6 DDE discovery no longer works on the affected system. The problem was noticed after a Windows update, but the responsible update has not been independently confirmed.

Is this a known issue, and can it be investigated or escalated to the Windows team?

Windows development | Windows API - Win32

1 answer

Sort by: Oldest
  1. Gatlin Le (WICLOUD CORPORATION) 1,495 Reputation points Microsoft External Staff Moderator
    2026-11-24T03:51:01.74+00:00

    Hi @Christophe Carron ,

    Thank you for the clear reproduction. Losing DDE discovery in an existing Delphi 6 application after an update is disruptive, so I looked into both the documentation and a local test. Based on the public Microsoft documentation, DefSubclassProc is expected to forward WM_DDE_INITIATE the same way as any other message, and I could not find a documented exception for DDE messages or for ANSI windows. I also checked Windows 11, version 25H2 known issues and notifications and did not see an entry related to DDE or window subclassing, so I cannot confirm from the forum side that this is a known issue.

    The DefSubclassProc documentation states that it calls the next handler in the subclass chain, and that the last handler calls the original window procedure. The SetWindowSubclass documentation lists comctl32 version 5.8 or later as the requirement, so the 5.82 module you are using is within the supported range.

    For the message itself, the WM_DDE_INITIATE documentation describes wParam as the client window handle and lParam as the application and topic atoms, where NULL means any application or any topic. Using Dynamic Data Exchange explains that a client usually broadcasts this message with SendMessage and HWND_BROADCAST, and sends it directly only when it already has the server window handle.

    I also tested this on my machine: a Windows 11 26H2 virtual machine, build 26300.9457, running a 32-bit ANSI test application. The comctl32 module actually loaded was 5.82.26100.8521, the same file version you reported. I used two equivalent ANSI windows, subclassed only one of them with SetWindowSubclass, and sent WM_DDE_INITIATE and a control message to both from the same thread, another thread and another process, with specific atoms and with lParam set to 0. In all 30 runs, the original window procedure of the subclassed window received WM_DDE_INITIATE after DefSubclassProc, so my result is different from yours. My build is not 26200.9974, and I did not test HWND_BROADCAST delivery, which is the path David Lowndes mentioned, so this does not rule out the issue on your system.

    These findings are based only on the public documentation and on what I could reproduce from the details in your question. Confirming whether this is a regression in a specific Windows update, and having it investigated by the Windows team, is outside what I can do in the forum. For that, Windows Developer Support is the appropriate channel, and your minimal sample, the exact OS build, and how WM_DDE_INITIATE is sent would be useful to include when you open a case.

    I hope the documentation and my test results help you narrow this down and get your application working again. If you find this answer useful, you may consider following the guidance when convenient, as it can also help others who run into a similar issue.

    Thank you

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.