Menu

WTL9 breaks CSplitterWindow subclassing

thims
2014-04-23
2014-04-29
  • thims

    thims - 2014-04-23

    Just downloaded the latest WTL9 and found that my CSplitterWindow (created using DDX_CONTROL) is not showing any cursor on splitter bar. I found that now the cursor is set in WM_CREATE handler. But the control is not getting WM_CREATE if I subclass static. So it doesn't perform OnCreate.

     
    • Nenad Stefanovic

      Well, this is rather unusual use of the splitter window. Note that this is
      not a regression, it was not supported before either. OnCreate() handler
      does more than just load the cursor.

      We might add support for this use in the future by overriding
      SubclassWindow(). In the meantime, you should do exactly what OnCreate()
      does: load the cursor and call GetSystemSettings(). In addition to that you
      should also call SetSplitterRect().

      Cheers,
      Nenad

      On Wed, Apr 23, 2014 at 5:27 AM, thims thims@users.sf.net wrote:

      Just downloaded the latest WTL9 and found that my CSplitterWindow (created
      using DDX_CONTROL) is not showing any cursor on splitter bar. I found that
      now the cursor is set in WM_CREATE handler. But the control is not getting
      WM_CREATE if I subclass static. So it doesn't perform OnCreate.


      WTL9 breaks CSplitterWindow subclassinghttps://sourceforge.net/p/wtl/discussion/374433/thread/152f76ef/?limit=25#837c

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/wtl/discussion/374433/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • thims

    thims - 2014-04-24

    Thank you for the answer! Subclassing is a very convenient way to create a splitter. In WTL8 cursor initialization is in CSplitterImpl constructor and this is why it worked before. I hope that subclassing will be supported for CSplitterWindow some day...

     
  • thims

    thims - 2014-04-29

    Great! Just tested it, works flawless!

     

Log in to post a comment.