Surely your professor has given you more information than you have given us?
Is your application supposed to be text or GUI?
Are you supposed to click on the keys?
If so, what is supposed to happen if you do?
Is this strictly Win32 or are you using some sort of graphics library?
Are you supposed to draw the keyboard yourself, or just to display some keyboard image?
The keyboard is supposed to be GUI.
Its strictly Win32 and preferably no graphics supports mouse movement and whenever buttons are pressed on the real keyboard the on-screen keyboard should reflect the event by changing the corresponding key's color,An on-screen display is also associated with it so that keys pressed can be seen.........
Visual C++ has a pretty good "calculator" example in the free examples that come with Visual C++, including the express version. You press buttons on the calculator and it displays them in the text box portion. It has an action listener for all the buttons. Expand it and you have a keyboard. It doesn't do color changes though, so you would have to tweak that part. I guess you'd have to modify it from listening for buttons pressed with the mouse to a keyboard listener.
If you use that sample program and it is "skipped" when compiling, make sure that, in one of the drop down menus, "Win 32" is selected and not "Itanium", which seems to be the default. It was REAL aggravating till I finally found that exact issue on the MSDN forums.
Hmm, you've actually got a bit of work ahead of you. I see two possibilites:
Have two pictures of a keyboard: one with all keys up and another with all keys down.
Display the picture of the keyboard with all keys up and whenever you get a keydown or keyup event (WM_KEYDOWN, etc.) copy the appropriate part of the appropriate picture to the image you are displaying to the user.
Using a form designer, drop a tpanel or tbutton or something for each key on the keyboard and arrange them to look like a keyboard. Attach their key up and key down event handlers to something that alters their appearance appropriately.