Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CRichEditCtrl SetEventMask problem

CRichEditCtrl SetEventMask problem

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    YaronNir
    wrote on last edited by
    #1

    Hi all, i've created this class that inherites from CRichEditCtrl:

    CMyRichEditCtrl::CMyRichEditCtrl()
    {
    }

    CMyRichEditCtrl::~CMyRichEditCtrl()
    {
    }

    void CMyRichEditCtrl::PreSubclassWindow()
    {
    CRichEditCtrl::PreSubclassWindow();
    SetAutoURLDetect();
    SetEventMask(ENM_CHANGE | ENM_LINK);
    }

    BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
    ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
    ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
    END_MESSAGE_MAP()

    void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
    {
    }

    void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
    {
    }

    problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break??? can any1 help thanks in advanced Yaron

    Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)

    Y 1 Reply Last reply
    0
    • Y YaronNir

      Hi all, i've created this class that inherites from CRichEditCtrl:

      CMyRichEditCtrl::CMyRichEditCtrl()
      {
      }

      CMyRichEditCtrl::~CMyRichEditCtrl()
      {
      }

      void CMyRichEditCtrl::PreSubclassWindow()
      {
      CRichEditCtrl::PreSubclassWindow();
      SetAutoURLDetect();
      SetEventMask(ENM_CHANGE | ENM_LINK);
      }

      BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
      ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
      ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
      END_MESSAGE_MAP()

      void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
      {
      }

      void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
      {
      }

      problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break??? can any1 help thanks in advanced Yaron

      Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)

      Y Offline
      Y Offline
      YaronNir
      wrote on last edited by
      #2

      ok i found what the problem was, instead of catching

      ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)

      i should have caught

      ON_CONTROL_REFLECT(EN_CHANGE,OnRichEditChange)

      thanks anyways cheers Yaron

      Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups