Any handgun you choose to own for the range and/or SD can easily be employed fore HD. There shouldn't be any distinction between SD and HD in my mind. The caliber you choose is also a personal decision to be made based on your individual needs and wants.
You will not get much of an arguement from me on either of your intended choices. However, have you fired either? I mean to say, have you ever had either of these in your hands? Some people these days go the "High School Popularity" route when making their choices in: cell phones, hair styles, political candidates and firearms just to name a few examples. Popularity should only be a porchlight drawing your attention, it shouldn't be a means to base a decision.
If you have handled these and fired them in the caliber you are interested in, then you know how they "feel" to you when you shoot them. Fit and comfort level are, IMO, where your decision making process should be based. It's where I start. Then again, it is my belief that if it doesn't fit and feel good in your hands, you will not be able to shoot it as well as if it does.
I have and continue to shop and shoot (when the opportunity presents) many makes and models of handguns. There are many I do not like for many different reasons and there are some I really like for just as many reasons.
The primary difference between the two you mentioned is that the P226 is the full sized version and the P229 is slightly shorter in length and height. I do not know your size nor build and these are two factors that will play into whether or not they would carry well. Where you intend on living and the weather conditions will also play a factor. ANYTHING you choose for carry or SD/HD will always make a good range gun. Unless you consider an "old beater" you can abuse for a range gun, then in that case I don't think you should be spending this amount of money at a range gun. The CPO market may be a better option if this is what you wish.
More information would be helpful and the longer you hang around here and similar places, the better the "residents" will get a feel for who you are. Specific questions will get you better answers than generalized ones, generally and the more we get to know you the better our advice and suggestive offerings can be.