WTL help - Time Control

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

WTL help - Time Control

Post by Gratch06 » 2003-08-01 16:17

I would like to create a box similar to the one in windows where the time is set. It will have a textbox (having a : in the center, if at all possible) and a set of up down arrows at the end. I am able to create labels, listboxes, etc. and manipulate and move them, but my issue is that I don't understand fully how the declarations work, and there is an incredible lack of good documentation (at least at the sites where I looked) on the WTL library. It appears that there is a CDateTimePickerCtrl, but I couldn't get it to come up for me....in the code to create a File Type Listbox, what is everything from WS_CHILD on?

Code: Select all

	ctrlFiletype.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 
		WS_HSCROLL | WS_VSCROLL | CBS_DROPDOWNLIST, WS_EX_CLIENTEDGE);
	fileTypeContainer.SubclassWindow(ctrlFiletype.m_hWnd);

I have a feeling my error lies in not fully understanding those options, or which I should use when creating the CDateTimePickCtrl.

The other option which I toyed with and ran into the same situation on is creating a basic CEdit textbox, then sticking a CUpDownCtrl right next to it and somehow linking them. Once again, a lack of knowledge about these parameters got me, and I'm stuck.

Summing up what I'm looking for:
A declaration/creation routine for a CDateTimePickCtrl (never did find a picture of one to know if this is really what I wanted).
Alternative method: A declaration for an CUpDownlCtrl with two small arrows, one up and one down, and a head start in how to link that with a text box.

- Gratch06

Locked