"so that when you are reading the code, you know exactly what type of variable it is. "
see Hungarian Notation in the link that I sent in the first reply.
This is mainly for good readabilty of code and easier programming for complex codes.
eg 1) DWORD is always 32 bytes int can be 16 , 32, 64 depending on machine.
2) when I say HWND variable name, I know that the variable represent an handle to window which would not be known if i use int, also HWND is encapsulated and user need not worry about underlying datatype.
3) when using int , int is taken as unsigned int in some machine and signed in some machine,
which causing bugs in the code. for different os.
i think the list goes on, just have to think about it.