473,832 Members | 2,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date Time Pickers...

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_DATETIMEPIC KER1. 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
Nov 17 '05 #1
2 3957

"Need Helps" <an*******@disc ussions.microso ft.com> wrote in message
news:31******** *************** ***********@mic rosoft.com...
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_DATETIMEPIC KER1.
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".
Nov 17 '05 #2
"Need Helps" <an
on*****@discuss ions.microsoft. com> wrote in message
news:31******** *************** ***********@mic rosoft.com...
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_DATETIMEPIC KER1.
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_SetRan ge (), DateTime_SetSys temtime () and
DateTime_GetSys temtime () to use the control. The handle can be had if you
know the ID, dlg.GetDlgItem (IDC_DATEPICKER )->m_hWnd.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
3103
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. This is the old problem of US date format mm/dd/yy versus dd/mm/yy. I am stepping through the code and the dates do seem to be ok but when the report runs I get records earlier than 1st October which is not what I want.
6
2771
by: kevin carter | last post by:
hi i have a table conataining several fields one of which is date i want to be able to search the table on the date field using code. the code below generates the query from a form, however i get an error message "Run time Error 2001" when this code is run. Can anyone please tell me where i have gone wrong or how to stop this error message Dim db As DAO.Database Dim qdf As DAO.QueryDef
5
3381
by: WindAndWaves | last post by:
Hi Gurus This is a cry for help to all of you. I am looking for some sort of plug-in/active X/code/link to outlook/what have you, which I can add to my MS Access database for my users to manipulate dates. For example, as part of my project, I have a roster. I want my users to change the start and end times of the rostered people using a drop and drag scenario rather than entering data.
2
1597
by: ven | last post by:
Hello, I found a source of datepicker who opens a new window using java to select a date, but i saw a datepicker who doesn`t open a new window (dynamically opened on click), and i have a question maybe there is a tutorial how to write that datepicker? Ven
4
2674
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a datetime field it uses the default date which is a problem when I try to sort, what I wanted to know is there a way for me to set the date in the time picker to the date in the date picker? Any help greatly appreciated.
11
6207
by: carriolan | last post by:
Hi I have a very simple problem indeed, but I am unable to solve it. I am inputing a short date into an unbound text box with a short date input mask. I am in the UK so my date format is dd/mm/yyyy. Everything works superbly well with one exception. Example: Suppose I accidentally keyed in 04/13/2005 the program assumes that I meant 13/04/2005 and swaps the day and the month field around without displaying an error, so the date is...
3
1967
by: Darhl Thomason | last post by:
I'm building a database application that has a number of date fields in it. When I add the date/time picker control to my form and run it, if the field is null in my db, then it shows the current date. How can I get this control to be blank when the corresponding field in my db is blank? Thanks! Darhl
2
3123
by: keithsimpson3973 | last post by:
I have a program built in Visual Basic 6. It uses an Access 2003 database. My report selection form in vb6 has 2 date pickers for start date and end date. The report is an Access report. When the user selects a start and end date in vb6 form, I would like to show the 2 values of the date pickers from the vb6 form on the top of the Access report so they will see the date range values they selected on the report. I have had no luck. Does anyone...
2
2407
tuxalot
by: tuxalot | last post by:
I have a textbox, on with a record source . FrmMain is a tabbed form showing injury data for a given EmployeesID. I have a textbox, on a subform . with as the record source. is entered by a user and saved to the table by clicking a save button on the subform. Both date entries are in Short Date format and entered by Date Pickers. I would like an On Click event to fire when the save button is clicked which would compare if and are...
0
9795
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10781
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3078
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.