好像用这个API
HICON ExtractAssociatedIcon(
  HINSTANCE hInst,    // application instance handle
  LPTSTR lpIconPath,  // path and filename of file for which icon is 
                      // wanted
  LPWORD lpiIcon      // pointer to icon index
);