<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : SetCurSel() doesn&#039;t work</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : SetCurSel() doesn&#039;t work]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 19:08:47 +0000</pubDate>
  <lastBuildDate>Tue, 15 Apr 2008 22:27:44 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=10252</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[SetCurSel() doesn&#039;t work : Hi,    I want to change focused...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10252&amp;PID=33731&amp;title=setcursel-doesnt-work#33731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4094">tiratano</a><br /><strong>Subject:</strong> 10252<br /><strong>Posted:</strong> 15 April 2008 at 10:27pm<br /><br />Hi, <DIV></DIV><DIV>&nbsp;</DIV><DIV>I want to change focused date, so I used SetCurSel() function.</DIV><DIV>However, it didn't work. Here is my code. Is there anyone who can point out the problem?</DIV><DIV>&nbsp;</DIV><DIV>I'm using Xtreame ToolkitPro 2005 (10.3.1) on Windows XP Professional </DIV><DIV>&nbsp;</DIV><DIV>==============================================</DIV><DIV>&nbsp;</DIV><DIV>CXTPDatePickerControl wndDatePicker;<BR>&nbsp;<BR>&nbsp;CXTPWindowRect rcPopup(GetDlgItem(IDC_STARTDATE_SEARCH));</DIV><DIV>&nbsp;CRect rc;<BR>&nbsp;wndDatePicker.GetMinReqRect(&amp;rc);<BR>&nbsp;<BR>&nbsp;rc.InflateRect(0 ,0, 4, 4);<BR>&nbsp;rc.OffsetRect(rcPopup.right - rc.Width(), rcPopup.bottom);</DIV><DIV>&nbsp;COleDateTime dt1(2008, 4, 1, 0, 0, 0);<BR><FONT color=#ff0000>&nbsp;wndDatePicker.SetCurSel(dt1); // &lt;= why it doesn't work?</FONT></DIV><DIV>&nbsp;wndDatePicker.SetButtonsVisible(TRUE, FALSE);<BR>&nbsp;wndDatePicker.SetShowWeekNumbers(TRUE);</DIV><DIV>&nbsp;CString strResult = _T("");</DIV><DIV>&nbsp;if (wndDatePicker.GoModal(rc, this))<BR>&nbsp;{<BR>&nbsp;&nbsp;COleDateTime dtFrom;<BR>&nbsp;&nbsp;COleDateTime dtTo;</DIV><DIV>&nbsp;&nbsp;if (wndDatePicker.GetSelRange(dtFrom, dtTo))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;if (dtFrom == dtTo)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;strResult.Format(_T("%4d-%02d-%02d"),&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dtFrom.GetYear(), dtFrom.GetMonth(), dtFrom.GetDay());<BR>&nbsp;&nbsp;&nbsp;} else<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;// edit<BR>&nbsp;&nbsp;&nbsp;&nbsp;strResult.Format(_T("%4d.%02d.%02d - %4d.%02d.%02d"), <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dtFrom.GetYear(), dtFrom.GetMonth(), dtFrom.GetDay(), <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dtTo.GetYear(), dtTo.GetMonth(), dtTo.GetDay());<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} <BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;strResult = strCurrentText;<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;&nbsp;strResult = strCurrentText;</DIV><DIV>&nbsp;this-&gt;m_StartDateEdit.SetWindowText(strResult);</DIV>]]>
   </description>
   <pubDate>Tue, 15 Apr 2008 22:27:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10252&amp;PID=33731&amp;title=setcursel-doesnt-work#33731</guid>
  </item> 
 </channel>
</rss>