|
-
August 9th, 2007, 08:13 AM
#1
[RESOLVED] Dialog: Arrow keys and Spin control
Background:
I have a wizard-created Dialog-based project. I am using using a Spin control to scroll through a list of parameters. The project requires the user to manipulate various controls, based on results which are returned to the Dialog window. I want to permit the user to use the keyboard arrow keys, as well as the Spin control arrows, to help fatigue and be user-friendly.
Problem:
I can't find any *active* links with any sample code. I find many references to CHotKeyCtrl, but I get stuck on things like its parameter "hWnd": I find no reference to a Window handle in my Dialog. Hence my shameless request for code examples.
Thanks in advance.......
-
August 9th, 2007, 08:29 AM
#2
Re: Dialog: Arrow keys and Spin control
Can you be a bit more specific? What exactly is your problem?
Gort...Klaatu, Barada Nikto!
-
August 9th, 2007, 09:09 AM
#3
Re: Dialog: Arrow keys and Spin control
The user can scroll through the data by means of the ARROWS on the SPIN control in the Dialog. I want to assign the LEFT ARROW and RIGHT ARROW keys such that when they are pressed on the keyboard, the effect is the same as if the user had clicked on the corresponding ARROW on the Spin control.
So the problem is : How to get input from those two keys in a Dialog-based project?
-
August 9th, 2007, 09:39 AM
#4
Re: Dialog: Arrow keys and Spin control
Ok, then you're using a CSpinButtonCtrl object?
Gort...Klaatu, Barada Nikto!
-
August 9th, 2007, 10:03 AM
#5
Re: Dialog: Arrow keys and Spin control
I simply added a Spin control, and the class wizard created the following function:
::OnDeltaposNextPrevMeas(NMHDR* pNMHDR, LRESULT* pResult)
This uses _NM_UPDOWN, part of Windows Common Controls (as defined in commctrl.h).
Let's leave it at that, Mr Harnad. Sounds like using the keyboard to operate buttons is excessively hyper-complex.
-
August 9th, 2007, 10:46 AM
#6
Re: [RESOLVED] Dialog: Arrow keys and Spin control
Take a look at this thread . It will shed some light on your problem.
Gort...Klaatu, Barada Nikto!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|