Let K be an imaginary quadratic field of discriminant d(K) with ring of integers O-K, and let tau(K) be an element of the complex upper half plane so that O-K = [tau(K), 1]. For a positive integer N, let Q(N)(d(K)) be the set of primitive positive definite binary quadratic forms of discriminant d(K) with leading coefficients relatively prime to N. Then, with any congruence subgroup G of SL2(Z) one can define an equivalence relation (similar to)(Gamma) on Q(N)(d(K)). Let F-Gamma,F-Q denote the field of meromorphic modular functions for G with rational Fourier coefficients. We show that the set of equivalence classes Q(N)(d(K))/(similar to)(Gamma) can be equipped with a group structure isomorphic to Gal(KF Gamma,Q (tau(K))/K) for some Gamma, which generalizes the classical theory of form class groups.