While spelunking the Delphi 2005 VCL source code, I came across the following code in the Forms unit's ProcessMessage method of the TApplication class:

    Unicode := (Msg.hwnd <> 0) and IsWindowUnicode(Msg.hwnd);
    if Unicode then
      MsgExists := PeekMessageW(Msg, 0, 0, 0, PM_REMOVE)
    else
      MsgExists := PeekMessage(Msg, 0, 0, 0, PM_REMOVE);

Later,

        if Unicode then
          DispatchMessageW(Msg)
        else
          DispatchMessage(Msg);

Certainly, these portions of the ProcessMessage code never existed before Delphi 2005.

It looks to me like Borland might be preparing VCL to do Unicode, or trying to make Troy's (the guy behind TntUnicode, a Unicode-enabled VCL framework) life easier.

Anyway, I thought the code could be made more compact, so I submitted QC #11069.