Your H-4 status will not be impacted merely upon selection of H-1B cap petition in the H-1B lottery. You need to check if the H-1B cap petition was filed as a Change of Status, or a loose petition. If it was filed as a Change of Status, your status will change to H-1B with effect from the approval validity date given in the H-1B approval notice. Also, any travel outside the U.S. while the H-1B case is pending will cancel the Change of Status request.You must check with your Immigration Attorney before undertaking any travel outside the U.S. while the H-1B cap case is pending.
Thanks Rose for answering my question. I was not planning on traveling outside of the country while my H1-B case is pending. By the way, what exactly is considered as a loose petition?