Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

msg reflection trouble

Help
Vadim
2006-06-11
2013-05-13
  • Vadim
    Vadim
    2006-06-11

    i'm not sure whether this wasnt posted earlier, but anyway. i was trying to create owner drawn control from code ( as opposite to creation from resource) and use message reflection for that control, but it reflections didn't work. In LRESULT CWindowImplRoot< TBase >::ReflectNotifications(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) there was a line if(wParam)    // not from a menu which is incorrent for controls created by hand. so, i changed it to if(lParam && ((LPDRAWITEMSTRUCT)lParam)->CtlType != ODT_MENU)    // not from a menu. Is there any better solution for this problem? cause i dont really want to change wtl sources...

     
    • Igor Tandetnik
      Igor Tandetnik
      2006-06-11

      When creating your control, give it a unique non-zero ID, then ReflectNotifications would work as originally written.