I'm lucky, both myself and my husband wanted to cruise before we even met, since we've married, it is me that has pushed him further afield and off shore to more distant destinations. But that doesn't mean we didn't have to find some compromises.
Living aboard is simply harder than living in a house/apartment with all those conveniences. Your wife probably doesn't like the idea of being stuck in the cave below decks, cooking, and cleaning, while you are having "fun" up top tweaking the sails. Living aboard can be not being able to get a decent shower, hauling laundry and groceries from the nearest parking lot (or bus stop), being told to not use the head (my husband tried that line - just the once, because he didn't like to empty the tank so often) etc... Given all the undisputed negatives who can blame your wife?
If you want her to go with you - you have to balance things out. HELP / take responsibility for many of the traditional "housewife" chores so your wife gets to have some of the pleasure of living aboard too - has time to relax in the cockpit and read a book, or even sail while you look after the kids. Plan into your cruising/living so you expect to eat out frequently, to dock in places where she can get a dose of good shopping, flights home to catch up with friends and family, etc. from time to time. Make the benefits totally outweigh any inconveniences (who would not say not to being on some remote sun drenched, private beach for a week or more - while you are there, who cares about laundry?).
Sit down with your wife and try to understand what it is she doesn't like, and what her "perfect" live-aboard life would be... And please LISTEN, don't try and counter every statement she makes until you've heard the whole list. Then Ask - are some of the problems worth it for the benefits? If not how can we make these problems less of an issue? What can YOU (as the husband) do to remove or share these problems? There may not be an answer, but if you want to go sailing with your wife and family it is surely worth the time to ask and Listen - did I say Listen, that is important.
In an age where pools must have a secure and child safe perimeter fence, a boat can seem like a very child-unfriendly zone - so you have to put in precautions and rules that would not exist as dirt dwellers (and make sure everyone can swim, is tethered in or has a life jacket on - age dependent of course, probably not a good idea to tether your wife to the boat)
A book I loved, which has a chapter/section on working with your wife (rather than convincing her) - is Sensible Cruising: The Thoreau Approach - by Don Casey and Lew Hackler. At the end of the day if you can't work together you either won't go sailing, or you won't be married. Only you know which of those two futures you would choose, but hopefully you can find a way to do both.
Because of your wife's uncertainty and reluctance, you are going to have to set aside extra $'s from your boat budget just for your wife. If she might be interested Send her away on women only multi-day, live aboard sailing course. And be prepared to spend more on docking (rather than anchoring) where necessary, etc to make the whole thing more pleasant/attractive for her.
A 40' boat is going to be a big investment in your joint funds, and your time - another reason your wife may resent the boat. If you can't make her see that as family investment, and if you keep it as a separate project that you do while she stays at home, you are going to have some trouble.
I wish you luck. I think it really is a good life for a family. Any marital problems will be forced into the open once you are living in such close proximity, but rather discover and address them (if they exist), than live the comfortably numb life that most do. All the kids I know that live aboard are happy, articulate, intelligent, and confident - who wouldn't want that for their kids?
Beware of making promises/trades you don't mean, just to get your wife to "try" the boat - eventually they will bite you back.
Good luck, really, good luck, and I hope to see you out there soon.