A R R
well if u use MFC there are class for windows
in Windows operating system sends messages to your window's procedure (ex wM_mousemove, ...) witch is responsible for calling functions u want depending on the type of message
in mFC it is easy and u dant need to know all minor things
u just create a class for window derived from CFrameWnd and show wich functions u want to call on the specific event=message
u create the CWinApp::instance(...) of these class CFramewnd::Create(...) in initinstance-function of you CWinApp class object representing the application and
and give the pointer to the window m_pMain...= ptrYourWnd;
look in MSDN= microsoft developer network
if u want to use borlands VCL there are also some classes
But if u want to use WinAPI=aplication programming interface directly it is hard
but i can send u a skeleton
if u want some details write me mail www.tsadigov@yahoo.com
I am a beginner but i hope i will be able to help u