Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SysMonthCal32: no keyboard navigation ?

50 views
Skip to first unread message

R.Wieser

unread,
Apr 24, 2013, 3:13:32 PM4/24/13
to
Hello All,

I've got a SysMonthCal32 component on a dialog, and can tab to it
(WS_TABSTOP) using the keyboard. The problem is that although it accepts
focus I can't, using the keyboard, seem to navigate to any of its
sub-components / change anything.

My question: what do I need, using XP sp3, to enable keyboard control within
that component.

Regards,
Rudy Wieser


JJ

unread,
Apr 25, 2013, 8:57:29 PM4/25/13
to
The keyboard navigation controls are predefined as described in "About Date
and Time Picker Controls" MSDN article.

R.Wieser

unread,
Apr 26, 2013, 4:35:21 AM4/26/13
to
JJ,

Alas, although the article tells me, in the list under the second image,
that a function key will drop down a calendar control, it does not say
anything about which keys are valid/to be used in it.

On a hunch I just pressed the, also in that list mentioned, PGUp, PGDown,
End and Home keys. They moved to the next/previous year and end/begin of
the selected month repectivily.

Ok, those are found. Now how do I move to a next or previous day ? The
cursor keys just move the focus away from the SysMonthCal32 control. :-\

Regards,
Rudy Wieser


-- Origional message:
JJ <d...@nah.meh> schreef in berichtnieuws
2fkwmi2ukfc0.e...@40tude.net...

R.Wieser

unread,
Apr 26, 2013, 5:08:45 AM4/26/13
to
"They moved to the next/previous year"

That should have been "next/previous *month* ofcourse.

It also made me realize that I also miss keys to change the year/get the
year up/down control to popup (click the year at the top-center)



JJ

unread,
Apr 26, 2013, 2:46:48 PM4/26/13
to
On Fri, 26 Apr 2013 10:35:21 +0200, R.Wieser wrote:
> Alas, although the article tells me, in the list under the second image,
> that a function key will drop down a calendar control, it does not say
> anything about which keys are valid/to be used in it.
>
> On a hunch I just pressed the, also in that list mentioned, PGUp, PGDown,
> End and Home keys. They moved to the next/previous year and end/begin of
> the selected month repectivily.
>
> Ok, those are found. Now how do I move to a next or previous day ? The
> cursor keys just move the focus away from the SysMonthCal32 control. :-\

You're right, the article doesn't mention all of the details. -_-

The arrow keys are indeed used to change the date selection. My hunch tells
me, that the GUI framework you're using, whatever it is, is interfering the
control input. I checked with Delphi (a Win32 Date-Time Picker; not .NET
one) and it works fine in a window with a date-time-picker and a utton
controls. When the date-time-picker's calender selector is pulled down, the
arrow keys doesn't move the focus out from it and onto the button control.
Even TAB / SHIFT+TAB keys don't change the focus.

Here are the keyboard shortcuts that I know:

LEFT = select previous value (from edit box)
RIGHT = select previous value (from edit box)
MINUS / DOWN = decrease value (from edit box)
PLUS / UP = decrease value (from edit box)

F4 / ALT+DOWN = pull down the calendar (from edit box)
ENTER / ALT+UP = pull up the calender. use selection (from calendar)
ESCAPE = pull up the calendar. don't use selection (from calendar)

ARROW KEYS = move date selection (from calendar)
PAGEUP = select previous month (from calendar)
PAGEDOWN = select next month (from calendar)
CTRL+PAGEUP = select previous year (from calendar)
CTRL+PAGEDOWN = select next year (from calendar)

R.Wieser

unread,
Apr 28, 2013, 3:45:56 AM4/28/13
to
JJ,

> My hunch tells me, that the GUI framework you're using,
> whatever it is, is interfering the control input.

I've just placed a single SysMonthCal32 control in a dialog (and nothing
else), but it still refused to listen to the cursor keys ...

Could you look (when in the program) at what which GWL_STYLE and GWL_EXSTYLE
bits your control has ?

*My* hunch is that I just have not included the right setting (settings your
programming-environment perhaps adds by default) :-\ :-)

Mind you, I'm talking about the SysMonthCal32 control, not the
SysDateTimePick32 one.

Regards,
Rudy Wieser


-- Origional message:
JJ <d...@nah.meh> schreef in berichtnieuws
1lmvlsau4uwkx.6...@40tude.net...

JJ

unread,
Apr 28, 2013, 9:24:39 AM4/28/13
to
On Sun, 28 Apr 2013 09:45:56 +0200, R.Wieser wrote:
> Mind you, I'm talking about the SysMonthCal32 control, not the
> SysDateTimePick32 one.

My brain fails me sometimes. Sorry.

> I've just placed a single SysMonthCal32 control in a dialog (and nothing
> else), but it still refused to listen to the cursor keys ...

Now I know what you meant.

Surprisingly, the CTRL+ALT must be held in order to make the arrow key to
work. And irritatingly, the MSDN (at least in MSDN from VS2008) doesn't
mention anything about this.

R.Wieser

unread,
Apr 28, 2013, 11:16:44 AM4/28/13
to
JJ,

> My brain fails me sometimes. Sorry.

Well, mine does the same, so I know how you feel. :-\

> Surprisingly, the CTRL+ALT must be held in order to make
> the arrow key to work.

Alas, it does not seem to want to function for me (XP sp3). I tried several
ctrl, alt and shift combinations with both the normal and the numeric-pad
cursor-keys, but no next/previous day change result. :-(

Oh well, if everything fails I could always try to subclass the control and
let it respond to simple cursor-key presses -- I'm not going to assume a
run-of-the-mill user (or even myself in a couple of months) will
know(/remember) about that "secret" CTRL+ALT is needed to make the
cursorkeys work.

Regards,
Rudy Wieser


-- Origional message"
JJ <d...@nah.meh> schreef in berichtnieuws
rpkfjr4lccin.1u...@40tude.net...

R.Wieser

unread,
Apr 30, 2013, 2:26:50 PM4/30/13
to
[Quote myself]
> Oh well, if everything fails I could always try to subclass the
> control and let it respond to simple cursor-key presses

And that is what I did. After capturing the WM_GETDLGCODE message and
returning the DLGC_WANTARROWS status on any of the cursor-keys VK_ codes I
could navigate to previous/next days as well as weeks.

Regards,
Rudy Wieser

P.s.
I found a SysMonthCal32 description mentioning that the Vista control
(comctl32 v6.0 and above) behaves a bit different than the ones before it.
No mentioning on *how* though :-\

P.p.s.
I googled the problem once again, and found a post of mine about the same
.... from 2003 ! :-)
http://groups.google.com/group/microsoft.public.vb.winapi/browse_thread/thre
ad/42b15d2a2cc039ba


-- Origional message:
R.Wieser <add...@not.available> schreef in berichtnieuws
517d3ce7$0$15901$e4fe...@news2.news.xs4all.nl...

JJ

unread,
May 1, 2013, 5:01:19 AM5/1/13
to
On Tue, 30 Apr 2013 20:26:50 +0200, R.Wieser wrote:
> I found a SysMonthCal32 description mentioning that the Vista control
> (comctl32 v6.0 and above) behaves a bit different than the ones before it.
> No mentioning on *how* though :-\

That's why I didn't mention about it as a possible solution. -_-

> I googled the problem once again, and found a post of mine about the same
> .... from 2003 ! :-)
> http://groups.google.com/group/microsoft.public.vb.winapi/browse_thread/thre
> ad/42b15d2a2cc039ba

No d�j� vu? :)

R.Wieser

unread,
May 1, 2013, 5:22:05 AM5/1/13
to
JJ,

> No d�j� vu? :)

Alas, no. It seems that that post did not get an answer either. :-\

Regards,
Rudy Wieser


-- Origional message:
JJ <d...@nah.meh> schreef in berichtnieuws
6xz76tg6kcgl$.1deeinjng0m15.dlg@40tude.net...
0 new messages