BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Bugs and Problems
 CBCGPPropList updating problem !
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Fess

1 Posts

Posted - 02/11/2005 :  05:34:33 AM  Show Profile  Reply with Quote
I have some property as CBCGPDateTimeProp.
And i want to change date in this prop:

CBCGPProp* pHeader = m_pPropList->GetProperty(0);
CBCGPDateTimeProp* prop = (CBCGPDateTimeProp*)pHeader->GetSubItem(0);
COleDateTime date = COleDateTime::GetCurrentTime();
prop->SetDate(date);

But new date isn't shows.
It's invalidates only after click on this prop.

P.S. prop->Redraw() not working too.

Fess

Support

3628 Posts

Posted - 02/11/2005 :  11:04:44 AM  Show Profile  Visit Support's Homepage  Reply with Quote
You're right: there is a bug in our code, that will be fixed in the next library release.

Currently, we suggest a following simple workaround to solve the problem:

class CMyDateTimeProp : public CBCGPDateTimeProp
{
public:

	CMyDateTimeProp (const CString& strName, const COleDateTime& date, 
		LPCTSTR lpszDescr, DWORD dwData,		UINT nFlags) : CBCGPDateTimeProp (strName, date, 
		lpszDescr, dwData) {}

	virtual void SetDate (COleDateTime date)
	{
		SetValue (_variant_t (date, VT_DATE));
		m_wndDateTime.SetDate (date);
	}
};


And use CMyDateTimeProp instead of CBCGPDateTimeProp

Best regards,

BCGSoft Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2017 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000