This paper proposes an analytical solution for bidding strategy problem of transmission-constrained generating companies (GENCOs) in an hour-ahead electricity market. Here, for modeling a bidding strategy problem under a supply function equilibrium model, a bilevel programming (BLP) method is used. In the upper level, the profit of an intended GENCO is maximized, and in the lower level, the independent system operator clears the market via solving a bid-based security-constrained economic dispatch (SCED), in which SCED can be parameterized by GENCOs' bidding strategies. We apply an active-set method to solve a parametric SCED problem. The idea of implementing the active-set method is based on the fact that the optimal solution of a parametric quadratic programming (QP) problem with linear equality constraints can be determined directly. We also decompose generation scheduling, locational marginal prices, and consequently GENCOs' profits, in terms of GENCOs' bidding strategies. In this situation, the BLP transforms to a single-level inequality-constrained optimization, which maximizes GENCO's profit subject to inactive constraints of the lower level. In addition, GENCOs' strategic interactions in oligopolistic marketplace are investigated by using a game theoretic framework, and optimal bidding strategies are determined then by finding the Nash equilibrium of GENCOs' noncooperative competition. Two case studies are provided to illustrate the proposed method; in addition, a numerical method has been conducted to validate the results. The results clarify the impact of each GENCO's bidding strategy on the power flows of transmission lines.