I'm trying to use CustomDrawDockingSelection event. It looks like it works fine for the first time but it does not working for the second time (it does not paint).
Steps to Reproduce:
- Run attached application
- Undock panel(docking frame paint as black area)
- Dock panel back.
- Undock panel(docking frame do not paint )
Hello Nikolai.
Thank you for your message.
This behavior can be caused by the fact that the CustomDrawDockingSelection event uses an outdated technology, because it uses the screen context as a DC parameter. However, this is not recommended for Windows7 and Windows Vista operating systems. In new versions, this event was not removed for backward compatibility with older versions of the ExpressDocking Library. We'll add this information to our documentation (see Documentation - Update the "TdxDockingManager.OnCustomDrawDockingSelection" help topic) and mention that this event should not be used for Windows Vista and higher.
To learn more about why it is not correct to use a screen DC, please review the Painting problem when dragging a panel if Aero theme is enabled report. To fix this behavior, we've implemented a new technology of drawing frames using forms.
Also, can you clarify why it is necessary to use this approach? To display a filled frame, you can use the TdxDockingManager's Options.doFillDockingSelection. If it does not meet your requirements, please provide us with more detailed information about this task in a step-by-step manner. We'll examine it and do our best to find a solution for you.
Best regards,
Ingvar.