The container control sends the WM_CONTROL (in Container Controls) message with the CN_EXPANDTREE notification code to its owner whenever the container expands a parent item in the tree view.
param1 USHORT id /* Container control ID. */ USHORT CN_EXPANDTREE /* Notification code. */ param2 PRECORDCORE pRecord /* Pointer to the record that was expanded. */