Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItemDate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItemDate

 Post Reply Post Reply
Author
Message
restlessone View Drop Down
Newbie
Newbie
Avatar

Joined: 15 April 2010
Location: Russian Federation
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote restlessone Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItemDate
    Posted: 15 April 2010 at 10:13am
Hello!
With version of 13.0.0 i used this code and got notification when user changed date by selecting it on dropdown calendar control and when user typed date manually too.

class CUIPropertyDate : public CXTPPropertyGridItemDate
{
   ...
   virtual void OnValueChanged(CString strValue)
   {
     // want notification here!
   }
};

Now with version 13.3.1 i'm getting notification only when user typed date manually, but when user selecting it on calendar control - no more notification.

Do i something wrong or it's a bug of new version ?
Back to Top
restlessone View Drop Down
Newbie
Newbie
Avatar

Joined: 15 April 2010
Location: Russian Federation
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote restlessone Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2010 at 6:35am
So, sources:

void CXTPPropertyGridInplaceMonthCal::OnAccept()
{
     SYSTEMTIME sysTime;
     ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) &sysTime);

     sysTime.wHour = sysTime.wMinute = sysTime.wSecond = sysTime.wMilliseconds = 0;

     COleDateTime dtSelected(sysTime);

     CString str = m_pItem->Format(dtSelected);
     CString strBeforeEdit = str;

     CXTPPropertyGridItemDate* pItem = m_pItem;
     m_pItem = NULL;

     ShowWindow(SW_HIDE);
     ReleaseCapture();
     PostMessage(WM_CLOSE);

     if (pItem->OnAfterEdit(str))
     {
          if (strBeforeEdit == str) // Can changed in OnAfterEdit handler
          {
               pItem->SetDate(dtSelected);
               pItem->NotifyValueChanged();
          }
          else

          {
           pItem->OnValueChanged(str);
          }
     }
}

Blue strings was added in 13.3.1 and now red string seems always unreachable. So it's bug ?

Somebody can tell me, is there any other way to get more faster tech. support here ? Or i must wait for an answer for a weeks ? :)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.