Question about Thomas and Martha Wayne

I was wondering, how did Thomas and Martha Wayne have so much money?

I feel like I hear two versions of Thomas Wayne (there are of course a lot more, i.e. Flashpoint Batman, portrayal of Thomas in some Black Label comics, etc. but for the purpose of this thread I am only talking about the main DC Universe - Earth 0).
There is one version of Thomas as a renown doctor and then another version of him as filthy rich and running a company, Wayne Enterprise. I’m confused how those two lives of Thomas go together.

I don’t feel like he made that much money from being a doctor to start a company and if the Wayne’s money came from Martha’s side of the family (which if memory serves me right it does) then how did the creation of Wayne Enterprise come about. Was the company originally his in-laws and he took it over and changed the name?

Here is hopefully a synthesis of my questions:

  1. Where do the Wayne’s get there money?
  2. How was Thomas a Doctor and the head of Wayne Enterprise? (I think he was first a doctor and then the head of Wayne Enterprise but I’m not sure).
  3. Did Thomas create Wayne Enterprise or did he receive it (from his family or his wife’s)?
  4. What did Wayne Enterprise produce - specifically when Bruce was a boy or before his time?

And if possible could you also post your source material. Not at all required but would be fun to read the original comics.

Thanks everyone.

The Wayne family has been rich for generations. One story that explores the history of the Waynes is Scott Snyder’s “Court of Owls” storyline.