Connected Dominating Sets (CDS) have been widely used to serve as virtual backbones for the topology control of wireless ad hoc networks. Lifetime is one of the most important characteristics of a wireless ad hoc network since mobile nodes are equipped with energy-limited batteries. In this paper, we propose two CDS construction algorithms, CDS-LL and Extended CDS-LL (E-CDS-LL), to prolong lifetime of a CDS-based wireless network. The CDS-LL algorithm trades CDS size for lifetime by a tunable parameter . When moves from 1 to 0, a CDS will be constructed with more energy-rich nodes. In the simulation, we show that when is 0.8, the CDS-LL algorithm increases lifetime at least 6 times through sacrificing around 8% of size. Moreover, since CDS nodes consume more energy than non-CDS nodes, the E-CDS-LL algorithm balances energy consumption of wireless nodes via dynamically selecting energy-rich nodes with the CDS-LL algorithm to reconstruct the CDS before the CDS is disabled. Simulation results show that network lifetime can be prolonged by 66% on average through the E-CDS-LL algorithm compared with the CDS-LL algorithm.