An invalid LM_WindowPosChanged is sent after a valid one causing double message traffic when a wincontrol moves or resizes.
Original Reporter info from Mantis: jamie @jamie
-
Reporter name: jamie philbrook
Original Reporter info from Mantis: jamie @jamie
- Reporter name: jamie philbrook
Description:
When processing the WM_WindowPosChanged message in a control a valid one is received and if the position or size has changed then the TWinControl.SendMoveSizeMessages emulates a WM_SIZE and WM_MOVE
The problem, it also sends an invalid blank LM_WIndowPosCHanged using the
Perform(LM_WindowPosChanged, 0, 0); on line 4325 of the WinControl.inc file as of this writing.
as you can see, the last parameter is the Lparam and this is suppose to contain the Pointer to a WindowPos record.
So in turn, you need to add code to your own code to determine if this is valid or not and on top of all this, when moving or sizing the a control which includes the form too, you get double of message traffic in the class.
I took my local copy, commented that line and rebuild , my code works fine and not only that I see a improvement with sizing and moving controls
Steps to reproduce:
Add a message handler for LM_WindowPosChanged on your form and take note of the NIL pointer that you receive in the incoming message while moving or sizing..
Mantis conversion info:
- Mantis ID: 39006
- Build: since 2.0.4 or older.
- Version: 2.1 (SVN)
- Fixed in version: 2.1 (SVN)
- Fixed in revision: 65258 (#520395f8)