Just because bad news is expected doesn’t mean it won’t hit a stock’s price hard.

Shares of Tencent Holdings (700.HK in Hong Kong and TCEHY in New York), China’s biggest Internet company by revenue, fell to a seven-month low on August 11, after it announced second-quarter results that missed analyst projections the day before. After rallying briefly, the stock has resumed its decline.

Everybody should have known this was coming. China’s Internet biggest companies, from Baidu (BIDU) to Tencent to Sina (SINA), are seeing costs rise as they invest in new services that will enable them to turn their huge user bases into more revenue.

For example, Sina—the owner of China’s third-most visited Web site—also announced second-quarter results that missed projections, because of the rising cost of adding features such as virtual currency and games to its Weibo microblogging service as competition with a rival product from Tencent gets more intense. Sina said that costs for Weibo may climb to $100 million in 2011.

In the second quarter, no surprise, Tencent Holdings reported increased spending on its microblogging service and e-commerce Web site.

The company reported that net income grew by 22% last quarter, to 2.35 billion yuan ($366 million), from 1.92 billion yuan in the second quarter of 2010. Analysts had been expecting net income of 2.58 billion yuan for the quarter.

The problem clearly wasn’t on the revenue side. Revenue climbed 44%, to 6.74 billion yuan, from 4.67 billion yuan in the second quarter of 2010.

But general and administration expenses more than doubled to 1.36 billion yuan, up from 666 million yuan in the second quarter of 2010. Selling and market expenses rose 60%, to 369.5 million yuan.

For the winners in this market, all this spending will create profit machines—big companies with lots of users will grow bigger as users are drawn to the size of the user base and the depth of services offered by the company. Tencent claims that it added 27.6 million active user accounts for its QQ instant-messaging service in the quarter, bringing the total to 702 million.

Investors need to take these numbers with a dash of soy sauce, since Tencent’s "total" figure exceeds the official total for all Internet users in China. But even a 50% haircut (a reasonable discount, in my mind) still adds up to a lot of eyeballs that will add their yuan to the Tencent till down the road.

You can already see that in the revenue growth from areas recently targeted for investment. Sales of Internet value-added services, which includes online games and QQ-related subscription fees, rose to 5.39 billion yuan, from 3.58 billion yuan in the second quarter of 2010. Online advertising sales grew by 29% year-over-year.

Don’t buy shares of Tencent or Baidu if you’re looking for a quick killing. The negative sentiment about growth in investments and costs is likely to continue for a while before the market starts to focus on the income that this investment is bringing in.

Use this period—two or three quarters, I’d say—to build positions in the companies that you see as winners in this contest.

Tencent Holdings is now selling at a price more than 20% below its 52-week high.

Full disclosure: I don’t own shares of any of the companies mentioned in this post in my personal portfolio. The mutual fund I manage, Jubak Global Equity Fund, may or may not now own positions in any stock mentioned in this post. The fund did own shares of Tencent Holdings as of the end of June. For a full list of the stocks in the fund as of the end of June, see the fund’s portfolio here.