Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtDateTimeWnd display problem Collapse All
Subject Author Date
Johannes Schwenk Apr 7, 2009 - 1:25 PM

Hallo,


i have a Problem with a CExtDateTimeWnd Derived Class. I Initialise the Control with a COleDateTime Pointer:


this->m_dtDate = *pdti;

UpdateDurationWnd();


pdti is COleDateTime*.


 


But the Control in My Display show the following:



but when I Click On the Dropdown Button of the Control, it changes to:



which is the Date from pdti.


What am I do wrong? (When I initialise the Date with this->SetDate() it’s the same).


 


Thanks for your help


 


 


 


 

Johannes Schwenk Apr 9, 2009 - 4:19 AM

*pdti:


m_dt: 38184.610196759262


m_status: valid


 


But as I said: The problem is not fixed by Setting the Date with this->SetDate()

Technical Support Apr 13, 2009 - 1:24 PM

You should use the SetDateTime() method instead of the SetDate() method. We modified the CPageDateTimeDuration::OnCmdMsg() method in the ProfUIS_Controls sample application for testing the date value you provided us with:

               case IDC_ADJUST_SIZE_DATETIME:   
                                    {
                                                DATE _a_date = 38184.610196759262;
                                                m_wndDateTime.SetDateTime( _a_date, true, true );
                                    }
                                    //m_wndDateTime.AdjustSize();
                                    //m_wndBoxDateTime.Invalidate();
                                    break;

With this modification we run the ProfUIS_Controls sample application and clicked the Adjust Size push button under the CExtDateTimeWnd control on the Date & Time dialog page and the specified date/time value was displayed in the CExtDateTimeWnd control.

Technical Support Apr 8, 2009 - 6:50 AM

Could you set a break point at the this->m_dtDate = *pdti; line of code and take a look at the *pdti object properties in debug mode (Shift+F9)? The COleDateTime class has the following properties:

   DATE m_dt;
            DateTimeStatus m_status;

We need to know values of these properties. This can help us reproduce and debug this issue.

Johannes Schwenk Apr 9, 2009 - 4:20 AM

*pdti:


 


m_dt: 38184.610196759262


 


m_status: valid


 


 


 


But as I said: The problem is not fixed by Setting the Date with this->SetDate()