Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2004

Tip: Looking for answers? Try searching our database.

Date Time Pickers...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Need Helps - 09 Jun 2004 22:16 GMT
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the graphical interface, and then used the graphical interface to add a Date Time Picker control to it.  The only problem is, I don't know how to do anything with the Date Time Picker, like access the date selected within the control.  All I have is the ID, which in my code is IDC_DATETIMEPICKER1.  Could someone tell me how to get some kind of handle to this control?  The msdn example, using the CreateWindowEx function, makes it easy to access a HWND to the Date Time Picker; is there a way I can get a HWND without first using CreateWindowEx?  Thanks in advance

NH
Michiel - 10 Jun 2004 10:41 GMT
> The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the
graphical interface, and then used the graphical interface to add a Date
Time Picker control to it.  The only problem is, I don't know how to do
anything with the Date Time Picker, like access the date selected within the
control.  All I have is the ID, which in my code is IDC_DATETIMEPICKER1.
Could someone tell me how to get some kind of handle to this control?  The
msdn example, using the CreateWindowEx function, makes it easy to access a
HWND to the Date Time Picker; is there a way I can get a HWND without first
using CreateWindowEx?  Thanks in advance!

> NH

Hmm is this MFC ? Cuz with .Net, a member is automatically generated. IIRC
with MFC this can be done by right-clicking the form or control in design
view and then select "Add member".
Matt Osborn - 10 Jun 2004 14:36 GMT
> The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the
graphical interface, and then used the graphical interface to add a Date
Time Picker control to it.  The only problem is, I don't know how to do
anything with the Date Time Picker, like access the date selected within the
control.  All I have is the ID, which in my code is IDC_DATETIMEPICKER1.
Could someone tell me how to get some kind of handle to this control?  The
msdn example, using the CreateWindowEx function, makes it easy to access a
HWND to the Date Time Picker; is there a way I can get a HWND without first
using CreateWindowEx?  Thanks in advance!

Look up the macros DateTime_SetRange (), DateTime_SetSystemtime () and
DateTime_GetSystemtime () to use the control. The handle can be had if you
know the ID, dlg.GetDlgItem (IDC_DATEPICKER)->m_hWnd.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.