   typedef struct _TREEITEM *HTREEITEM
  _TREEITEM is never defined. but it pass the compiler and no error. why compiler not said _TREEITEM no found?  why microsoft does it this way? any benefic?   
  That's the old opaque pointer hack. The reason the compiler doesn't complain is the same reason that you can write something like this in C++:struct X{   X *next;   int data;};Even though X is clearly not fully defined when X* next is processed - you don't need a definition to create a pointer, only a declaration. In C you can write struct anything_you_like *x; and it will assume anything_you_like will be defined later, which is why it works.The reason this is done instead of typedef void *HTREEITEM is to prevent the programmer from assigning one opaque pointer to another incompatible one.   