question 2 I am not sure if its going to be the same in VC++, however in Visual Studio 2005, in C# it creates the code to track all those buttons, here is a copy of some of it out of one my appliations
private void R1TimeSummaryViewDialog\_KeyDown(object sender, KeyEventArgs e)
{
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
- 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
+ 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
// Up
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
// Down
}
if ((e.KeyCode == System.Windows.Forms.Keys.Left))
{
// Left
}
if ((e.KeyCode == System.Windows.Forms.Keys.Right))
{
// Right
}
if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
{
// Enter
}
}
Hope this helps.
Computer Programmer Web/Mobile .NET