Add some codes for MFC