CMFCPropertyGridCtrl 可以用 AFX_WM_PROPERTY_CHANGED 来通知 Owner 来响应处理。Sent to the owner of the property grid control (CMFCPropertyGridCtrl) when the user changes the value of the selected property.但是其 时间点 是在 变化完毕后才通知。我有一个 Edit 的 ctrl 在 CMFCPropertyGridCtrl 中,如何捕获其实时的变化消息,就像 EDIT Ctrl 的 ON_EN_CHANGE 这样。

解决方案 »

  1.   

    是的,我看了 source code,只有 下面几个看上去像我需要的。virtual BOOL OnEdit(LPPOINT lptClick);
    virtual BOOL OnEndEdit();virtual BOOL EditItem(CMFCPropertyGridProperty* pProp, LPPOINT lptClick = NULL);
    virtual BOOL EndEditItem(BOOL bUpdateData = TRUE);但时间点 一个在 start edit,一个在 end edit。除非开始拦截 pretransmsg ,这个就复杂了一点点。
      

  2.   

    把定时器时间定短点,一直UPDATEDATA能实现吗?不过这样会影响速度
      

  3.   

    楼上,Updatedata 副作用好大。
      

  4.   

    你自己创建的CEdit放到CMFCPropertyGridCtrl中?处理(=EN_CHANGE)消息不行吗?
      

  5.   

    是的,自己创建,这个就又复杂了一点点,一点点。CMFCPropertyGridCtrl 本身就是 edit了,希望能够找到依托其自身的方法。
      

  6.   

    用 ON_EN_CHANGE  触发  AFX_WM_PROPERTY_CHANGED 
      

  7.   


    这个 ON_EN_CHANGE 是 Edit Ctrl 发出的。但 CMFCPropertyGridCtrl 不会发这个。